Threads

Bjorn Pettersen BPettersen at NAREX.com
Thu Jul 19 12:47:20 EDT 2001


> From: Tatiana Evers [mailto:tatiana at exatas.unisinos.br]
> 
> Hi,
> 
> I'm here again with more problems....;o)
> I need use threads in Python. How does interaction between 
> threads work? How
> do they communicate?

You can communicate through regular thread global variables (ie.
variables that are visible to functions running in each thread). You'll
want to read up on threading.Lock() to prevent multiple thread from
assigning to the same variable at the same time.

As an alternative, you could use module Queue...

-- bjorn




More information about the Python-list mailing list