On Aug 13, 2:31 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> Use the same Queue; put a special kind of Action, or just a None object,
> to tell the thread that there are no more things to process.
> From the main thread, you can join() the others, waiting for them to
> finish.
Ah, thank y
En Sun, 12 Aug 2007 21:45:47 -0300, Aaron J. M. <[EMAIL PROTECTED]>
escribi�:
> Uhg, I thought of something I didn't consider before: how to cleanly
> end the Server/DirectedControl(l)er process.
Use the same Queue; put a special kind of Action, or just a None object,
to tell the thread that
Uhg, I thought of something I didn't consider before: how to cleanly
end the Server/DirectedControl(l)er process. Assuming that the Client
only sends Actions to the DirectedController while the
DirectedController is in its turn() method (which I would probably
regulate using some flag in DirectedC
On Aug 12, 3:55 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> By this definition, if there is no "action" supplied, a
> "DirectedControler" will result in blocking ALL others (directed or not)
> in this "server" (as it blocks the entire server thread).
>
> Is that really the be
> I'm worried that this loop may wast some CPU cycles, and wonder if
> there's a better way through thread synchronization using such things
> as Events or Conditions.
Typically, people are after the Queue module in such cases. Each
DirectedControl(l)er would have an instance of the Queue class,
a
Hello,
This is a question about how to pause and unpause threads (as the
title suggests).
I've created an extension of threading.Thread which I'll call Server.
Server has a collection of Controlers. A Controler has a method
turn(), which lets it do various interesting things. While the
Server i