Re: async file i/o
- From: Havoc Pennington <hp redhat com>
- To: Michael Rothwell <rothwell holly-springs nc us>
- Cc: David Helder <dhelder umich edu>, gtk-app-list <gtk-app-devel-list gnome org>
- Subject: Re: async file i/o
- Date: 16 Jan 2001 16:16:01 -0500
Michael Rothwell <rothwell holly-springs nc us> writes:
I'm debugging my thread-per-open() async disk i/o library. It's got a
strange race condition at the moment. Such is threads. What would, in
your opinion, be the optimum method for a thread to notify the main gtk
program that it should do something? I'm currently doing this:
gdk_threads_enter();
gtk_idle_add_priority();
gdk_threads_leave();
... which causes the main thread to run my polling function, which
checks the struct that holds the shared data to see if a request has
been completed. This should always be true, and the callback removes
itself from the idle loop. That's a lot of in-and-out of the idle loop.
Would it be better to use signals?
No opinion on that - I've never experimented with threads and the main
loop at all.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]