Re: User interface thread

Eugene <[email protected]> Sun, 13 Nov 2005 19:40:41 +0300
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
On Sun, 13 Nov 2005 10:12:16 -0600 (CST)
  will guaraldi <[email protected]> wrote:
>     # 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?

Shutting the lyntin down is a bit messy and has some 
races, so I consider clarifying threading issues a bit. 
The code in question is unnecessarily hairy by now.

I guess, if any UI module can tell it wants the main 
thread, and the engine has no problems with it, then we 
could just as well run any UI in the main thread. I hardly 
can imagine a toolkit that objects against running in the 
main thread.

--
Eugene
---
Professional hosting for everyone - http://www.host.ru


-------------------------------------------------------
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