Matthew Wilson <[EMAIL PROTECTED]> wrote:
>In this code, I tried to kill my thread object by setting a variable on it
>to False.
>
>Inside the run method of my thread object, it checks a different
>variable.
>
>I've already rewritten this code to use semaphores, but I'm just curious
>what is going
On Jan 19, 2:43 am, Matthew Wilson <[EMAIL PROTECTED]> wrote:
> In this code, I tried to kill my thread object by setting a variable on it
> to False.
>
> Inside the run method of my thread object, it checks a different
> variable.
>
> I've already rewritten this code to use semaphores, but I'm jus
This is what's happening:
1) The chef thread releases the sema
2) While the chef thread is saying "Andiamo", decreasing "i", and
ending the while loop, the waiter thread SERVES the dish and RUNS to
reacquire the lock
3) Back in the main loop, chef.join() is run, and then the waiter's
variable i
On Jan 18, 7:43 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote:
> In this code, I tried to kill my thread object by setting a variable on it
> to False.
>
> Inside the run method of my thread object, it checks a different
> variable.
>
> I've already rewritten this code to use semaphores, but I'm jus
In this code, I tried to kill my thread object by setting a variable on it
to False.
Inside the run method of my thread object, it checks a different
variable.
I've already rewritten this code to use semaphores, but I'm just curious
what is going on.
Here's the code:
import logging, threading,