This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 loewis
收信人 amaury.forgeotdarc, benjamin.peterson, loewis, pitrou
日期 2008-08-02.01:50:23
SpamBayes Score 6.9536596e-05
Marked as misclassified
Message-id <4893BD5E.2030709@v.loewis.de>
In-reply-to <1217628534.5918.41.camel@fsol>
内容
> Well, if that resolution is prefered, I think it should be integrated to
> the builtin print function, rather than forcing users to monkeypatch it
> (but a debugging facility directly calling sys.stdout.write or
> equivalent will not be helped).

True. I think it is the stream's write method that must be
synchronized, e.g. by renaming the current write function to
_write_locked, and adding a write function that obtains a per-file
lock, and calls write_locked. Other methods accessing the buffer
need to get synchronized with the same lock as well.

This is how it's done in about any stdio implementation I ever looked at.
历史
日期 用户 动作 参数
2008-08-02 01:50:26loewis修改recipients: + loewis, amaury.forgeotdarc, pitrou, benjamin.peterson
2008-08-02 01:50:24loewis链接issue3476 messages
2008-08-02 01:50:23loewis创建