A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-March/052282.html below:

[Python-Dev] thread semantics for file objects

[Python-Dev] thread semantics for file objects [Python-Dev] thread semantics for file objects"Martin v. Löwis" martin at v.loewis.de
Fri Mar 18 19:41:35 CET 2005
stelios xanthakis wrote:
> I think that when two threads write to the same fd without 
> syncronization, the result is not
> deterministic anyway. In the case they are reading from the same fd, 
> even worse! (and therefore
> the input cannot be useful to any serious algorithm)

Yes, but we are not talking about the same fd. Instead, we talk about
the same FILE*. A thread-safe libc guarantees (AFAIK) that the data
passed to fwrite are appended as a whole. This, in turn, means that
the data passed to Python's file.write are also appended as a whole.

I'm pretty sure this property also holds on Windows.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4