[Top][All Lists]

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

[Gnumed-devel] final re: gmBackendListener

From: syan tan
Subject: [Gnumed-devel] final re: gmBackendListener
Date: Mon, 02 Feb 2004 09:50:05 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

Anything beyond "simple" things done in Python itself such as
setting a list value, changing a base type variable etc.

BTW, wxCallAfter() (a wxPython function, NOT wxWindows) uses
wxPostEvent internally ...

so how would the ui update its display when the data it's displaying changes, if it isn't via the thread that changes the data? I don't think any widget checks it's data periodically ( but can be notified via the wx event loop ). It should be in the documentation of gmDispatcher that any listener must do something like (wxCallAfter or wxPostEvent) if it is a custom widget and using gmDispatcher to receive notifications about model changes, in order to be thread safe; alternatively, make gmDispatcher threadsafe by having it's send body executed on the wx event loop ( e.g. via a Queue , (see the Queue package and the 1999 python thread safe discussion thread I found on google) ), or by having its send() executed within wxCallAfter ( which makes gmDispatcher wx dependent, unless the dispatcher has a passive sendQueuedSignals() which can be called either in OnIdle() or a DispatcherWxConnection object with its own thread that unloads the dispatcher, and calls wxCallAfter() )

I'm repeating myself, so I think I'll give up on this discussion now, and see what develops.

reply via email to

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