Re: User interface thread
will guaraldi <[email protected]> Sun, 13 Nov 2005 10:12:16 -0600 (CST)
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
Mmm... I can't remember--might be in the mailing list archives somewhere.
I'm 90% sure I made the decision to do it the way we did. I have vague
memories of explicitly spinning UI event handling off into a separate
thread and using the main thread for iterating through the event queue.
But then I think there were issues with various widget frameworks. So we
have handling for both possibilities. The code is in engine.py:
# we ask the ui if they want the main thread of execution and
# handle accordingly
if Engine.instance._ui.wantMainThread() == 0:
Engine.instance.startthread("ui", Engine.instance._ui.runui)
Engine.instance.runengine()
else:
Engine.instance.startthread("engine", Engine.instance.runengine)
Engine.instance._ui.runui()
So if the ui wants, it grab the main thread.
Out of curiosity, why do you ask?
/will
On Sun, 13 Nov 2005, Eugene wrote:
>
> Does anybody there have a good reason why we cannot run the user
> interface always in the main thread?
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php