RE: [Thread-SIG] marking shared-ness (was: baby steps for free-th reading)

Consider the case where a programmer forgets to note the sharedness. He passes the object to another thread. At certain points: BAM! The interpreter dumps core.
No. Using the "owning thread" idea prevents coredumps and allows the interpreter to throw an exception. Perhaps my note wasn't clear enough? /r$

On Wed, 19 Apr 2000, Salz, Rich wrote:
Consider the case where a programmer forgets to note the sharedness. He passes the object to another thread. At certain points: BAM! The interpreter dumps core.
No. Using the "owning thread" idea prevents coredumps and allows the interpreter to throw an exception. Perhaps my note wasn't clear enough?
INCREF and DECREF cannot throw exceptions. Are there other points where you could safely detect erroneous sharing of objects? (in a guaranteed fashion) For example: what are all the ways that objects can be transported between threads. Can you erect tests at each of those points? I believe "no" since there are too many ways (func arg or an item in a shared ob). Cheers, -g -- Greg Stein, http://www.lyra.org/
participants (2)
-
Greg Stein
-
Salz, Rich