need some help with threading module...
chahnaz.ourzikene
chahnaz.ourzikene at wanadoo.fr
Mon Dec 27 13:13:15 EST 2004
Hi everybody,
"Daniel Bickett" <dbickett at gmail.com> a écrit dans le message de news:
1104105568.212795.151000 at f14g2000cwb.googlegroups.com...
> Instead of having the Controller query the Subject (not exactly
> plausible), I had it wait for a signal (threading.Event) as set by the
> Subject. You could also have it query a queue, as that is a generally
> accepted and thread-safe object to use, but for this purpose I chose an
> event and a global variable. (I'm aware that some would look down on
> this, but I didn't see a problem, as it was only modified by one thread
> amd printed by the other.)
>
> Daniel Bickett
Your approache is a little different, since the subject is responsible of
emiting a signal/event to the controller. I wish to avoid this situation.
The reason is that i want to write an application where the model (the
system) is completely unaware of the view and the controller. This way, i
could easily change the way the model and the view interact, while the code
of the model remains unchanged. I don't know if this is possible, that's why
i'm trying to solve this problem with threads ! and hope someone could help
me :)
Thanks to all.
More information about the Python-list
mailing list