jackfirth / racket-disposable

An experimental Racket library providing an abstraction for values associated with external resources that allows automatic resource pooling, per-thread virtual construction, and monadic composition
Apache License 2.0
7 stars 0 forks source link

Make atomic-box properly kill safe #85

Open jackfirth opened 7 years ago

jackfirth commented 7 years ago

Killing a client thread can deadlock the box thread because the box thread attempts to send the result of applying a function in call/atomic-box back to the client thread. It should sync on the client thread's death event when attempting to send the result and skip sending it if the thread dies.