Message71538
| Author |
pitrou |
| Recipients |
pitrou, vstinner |
| Date |
2008年08月20日.11:56:36 |
| SpamBayes Score |
0.0011731144 |
| Marked as misclassified |
No |
| Message-id |
<1219233397.83.0.742568330492.issue3618@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|