gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] re gmBacklistener again


From: Horst Herb
Subject: Re: [Gnumed-devel] re gmBacklistener again
Date: Sun, 1 Feb 2004 21:11:39 +1100
User-agent: KMail/1.5.9

On Sun, 01 Feb 2004 16:40, syan tan wrote:
> actually, a lock inside gmDispatcher might not  be enough;
> what about having gmDispatcher queue up send signals,
> and then only dispatch them through a function 'dispatch'
> which is called inside an OnIdle() event handler from the
> main client window? That would mean dispatched signals
> would always be within the wx event loop thread.

The callbacks to be dispatched are supposed to either set a simple flag that 
triggers action within a module/widget, or to post a message into the wx 
message queue. Both these things should be thread safe in themselves. Complex 
GUI operations are not suited to be triggered *directly* (vs via message 
queue) via a dispatcher callback, though nothing (but stupidity) is stopping 
you from doing it.

Horst




reply via email to

[Prev in Thread] Current Thread [Next in Thread]