Re: concurrency program design stackless python tasklet or python thread?

2008-11-12 Thread davy zhang
thank you very much for the advices! I asked myself many times, why not just use thread:D After some research I found thread has some fatal defects 1. thread number is limited by os, that means the system don't want you start many threads at the same time 2. thread pool is another approach for c

Re: concurrency program design stackless python tasklet or python thread?

2008-11-11 Thread Aahz
In article <[EMAIL PROTECTED]>, davy zhang <[EMAIL PROTECTED]> wrote: > >first here is my basic idea is every actor holds their own msg queue, >the process function will handle the message as soon as the dispatcher >object put the message in. Sounds like a standard design. >This idea naturally le

Re: concurrency program design stackless python tasklet or python thread?

2008-11-11 Thread Aleksandar Radulovic
Hi there, On Tue, Nov 11, 2008 at 5:57 AM, davy zhang <[EMAIL PROTECTED]> wrote: > first here is my basic idea is every actor holds their own msg queue, > the process function will handle the message as soon as the dispatcher > object put the message in. Using stackless, every tasklet can have a

Re: concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
thanks very much for the hint, circuits is a very good event-driven frame work just like twisted but currently my project is in a pretty much complex way see, I'm designing a so called "Game Server", every client has their own task execution order, see like below: 1.clientA wants to sale his ar

Re: concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread James Mills
On Tue, Nov 11, 2008 at 3:57 PM, davy zhang <[EMAIL PROTECTED]> wrote: > first here is my basic idea is every actor holds their own msg queue, > the process function will handle the message as soon as the dispatcher > object put the message in. > > This idea naturally leads me to place every actor

concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
first here is my basic idea is every actor holds their own msg queue, the process function will handle the message as soon as the dispatcher object put the message in. This idea naturally leads me to place every actor in a separate thread waiting for msg but the rumor has it, stackless python wit