[Python-Dev] Last chance! (original) (raw)
Nick Bastin nbastin at opnet.com
Sun Mar 28 10:38:51 EST 2004
- Previous message: [Python-Dev] Last chance!
- Next message: [Python-Dev] Last chance!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mar 28, 2004, at 5:05 AM, Guido van Rossum wrote:
I saved the message, but haven't had the time yet to think things through.
I did notice at least one case where using ftstate might actually be a mistake: theoretically it's possible that two or more threads alternate calling next() on a generator (if they wrap it in a critical section); AFAICT the ftstate is never updated. [Christian] I've been running Stackless Python without ftstate for more than three months now, in various applications. May I check in a patch to evict ftstate? Sure! Let stackless lead the way. :-)
This may screw up the work I'm doing to get the profiler to work transparently with threads. Since I can't promise that the profiler will be in the same thread as the code being profiled, I can't guarantee that PyThreadState_GET() will give the correct thread state, so I grab the thread state from the frame object. Of course, this work is also in the super-early stages of development, so I may go some other direction in the future when I find out that this doesn't work correctly...just pointing out a potential user (victim).
-- Nick
- Previous message: [Python-Dev] Last chance!
- Next message: [Python-Dev] Last chance!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]