[Python-Dev] Last chance! (original) (raw)
Guido van Rossum guido at python.org
Fri Dec 19 13:15:24 EST 2003
- Previous message: [Python-Dev] Last chance!
- Next message: [Python-Dev] Last chance!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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.
Right, ftstate is never updated. I think there is another inconsistent situation, which can be created easily. If a generator is run by a different thread than it's creator, then the frame is run in that other thread. evalfame correctly uses tstate, but if tracing is activated, calltrace uses frame->ftstate for no obvious reason, which will probably mess up the tracing flags of the wrong thread.
Right.
Could you dig through CVS logs to find out when f_tstate was first introduced? Maybe there's a clue about why there.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Last chance!
- Next message: [Python-Dev] Last chance!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]