Message70612
> 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. |
|
| Date |
User |
Action |
Args |
| 2008-08-02 01:50:26 | loewis | set | recipients:
+ loewis, amaury.forgeotdarc, pitrou, benjamin.peterson |
| 2008-08-02 01:50:24 | loewis | link | issue3476 messages |
| 2008-08-02 01:50:23 | loewis | create | |
|