On Jun 2, 2004, at 1:20 PM, Martin v. Löwis wrote:
Bob Ippolito wrote:
However, JCSP uses java.lang.Threads to implement concurrency. So they are completely unlike Stackless' tasklets in their implementation strategy.
So what, if the API is the same?
If you don't have a problem with that, I don't either.
Using the stack or not is an implementation detail, what matters is having more control over the flow of your programs in a reasonably efficient manner. It just so happens that the recursive evaluation in CPython uses the stack in such a way that makes these kind of constructs impossible, so it needed to be changed for Stackless.
That is simply not true. It is possible and straight-forward to implement Stackless' tasklets and channels on top of the standard Python, with no need to change the interpreter proper.
In my quick attempt to do CSP on top of CPython threads I learned that: - It's not as easy as it sounds to get deterministic behavior out of threads, and debugging threaded python apps is no fun. - When it does work, the performance sucks compared to Stackless.
Perhaps someone with more Python threading experience can prove me wrong?