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/1999-August/000732.html below:

[Python-Dev] Buffer interface and multiple threads

[Python-Dev] Buffer interface and multiple threadsJack Jansen jack@oratrix.nl
Mon, 16 Aug 1999 21:36:40 +0200
Hmm, something that just struck me: the buffer _interface_ (i.e. the C 
routines, not the buffer object stuff) is potentially thread-unsafe.

In the "old world", where "s#" only worked on string objects, you
could be sure that the C pointer returned remained valid as long as
you had a reference to the python string object in hand, as strings
are immutable.

In the "new world", where "s#" also works on, say, array objects, this 
doesn't hold anymore. So, potentially, while one thread is in a
write() system call writing the contents of the array to a file
another thread could come in and change the data.

Is this a problem?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 



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