You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aside from all their other devilish subtleties, it appears to be that Chase-Lev queues don't completely guarantee that left and right pops don't both take the last queue element. If that happens here, I believe two threads could both try to fill the same IVar, in which case the second one will fill the IVar with an exception thunk (and then throw an exception). To fix this, we'd need put_ to take care to leave the IVar value alone when it's full. That's easy enough, but I don't think it's nearly enough: what do we do about the exception? A particularly nasty case involves two IVars, A and B, and two copies of the same thread, P and Q. Suppose P and Q each spawn threads to fill A and B, and those happen to do so in the opposite orders. Then P will die because B is full, and Q will die because A is full. I therefore believe that when Chase-Lev queues are enabled, non-determinism errors should be disabled.
The text was updated successfully, but these errors were encountered:
Aside from all their other devilish subtleties, it appears to be that Chase-Lev queues don't completely guarantee that left and right pops don't both take the last queue element. If that happens here, I believe two threads could both try to fill the same
IVar
, in which case the second one will fill theIVar
with an exception thunk (and then throw an exception). To fix this, we'd needput_
to take care to leave theIVar
value alone when it's full. That's easy enough, but I don't think it's nearly enough: what do we do about the exception? A particularly nasty case involves twoIVar
s,A
andB
, and two copies of the same thread,P
andQ
. SupposeP
andQ
each spawn threads to fillA
andB
, and those happen to do so in the opposite orders. ThenP
will die becauseB
is full, andQ
will die becauseA
is full. I therefore believe that when Chase-Lev queues are enabled, non-determinism errors should be disabled.The text was updated successfully, but these errors were encountered: