Movatterモバイル変換
[0]ホーム
[Python-Dev] RE: marking shared-ness
Greg Steingstein@lyra.org
Wed, 19 Apr 2000 13:52:12 -0700 (PDT)
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 ofobjects? (in a guaranteed fashion)For example: what are all the ways that objects can be transported betweenthreads. Can you erect tests at each of those points? I believe "no" sincethere are too many ways (func arg or an item in a shared ob).Cheers,-g-- Greg Stein,http://www.lyra.org/
[8]ページ先頭