
28 Dec
2018
28 Dec
'18
6:06 p.m.
Dear Viktor, Viktor Dukhovni wrote:
On Dec 28, 2018, at 12:44 PM, Bertram Felgenhauer via Haskell-Cafe
wrote: This is awkward to fix. Basically, when abandoning the lock before it has been released by the previous owner, we need a new thread to wait for the 'current' IVar and notify the 'next' one, since the current thread is being interrupted. I think that work can be delegated to the waiting thread, by making locks (really barriers) optionally chain to a parent barrier that also needs to be waited for (recursively). This is cheap, [...]
Thanks! Using the next waiting thread for cleanup work instead of spawning a fresh one is much more elegant indeed. Cheers, Bertram