Message71538
Yes indeed. We could use an RLock to avoid the problem but RLock's are
damn slow since they are written in pure Python (see #3001). Rewriting
the critical parts of RLock (constructor, acquire(), release(),
__enter__(), __exit__()) in C should not be too complicated, would you
want to do it? :)
> Solution: use C implementation of Lib/io.py (from Python 2.6) to avoid
> ceval hook?
I guess it's out of question. However, Buffered{Reader,Writer,Random}
should be rewritten in C one day, it is necessary for speed. Then the
problem will vanish since a lock will only need to be taken when
releasing the GIL, that is not when Python code is being interpreted. |
|
Date |
User |
Action |
Args |
2008-08-20 11:56:37 | pitrou | set | recipients:
+ pitrou, vstinner |
2008-08-20 11:56:37 | pitrou | set | messageid: <1219233397.83.0.742568330492.issue3618@psf.upfronthosting.co.za> |
2008-08-20 11:56:37 | pitrou | link | issue3618 messages |
2008-08-20 11:56:36 | pitrou | create | |
|