[PEAK] peak and multithread

Phillip J. Eby pje at telecommunity.com
Wed Jun 13 12:44:41 EDT 2007


At 04:38 PM 6/13/2007 +0800, weiwei wrote:
>Hi£¬all!
>
>1)       Can peak be used in multithread?

Yes.

>2)       How to use peak in multithread? Have some pitfall?

Each thread needs its own root component - i.e., nothing must be 
shared between threads.  As long as each thread creates its own root 
component (e.g. via config.makeRoot()), and never shares components 
with other threads, it should be fine.  But do let me know if you run 
into any problems.

By the way, I'm assuming here that you're referring to the main PEAK 
distribution, not the various PEAK spin-off projects, each of which 
may have different threading considerations from the main distribution.




More information about the PEAK mailing list