Unlock shared writer after close#26
Conversation
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
|
Small follow-up here: this is scoped to the close path after the writer mutex is acquired. On the successful The patch wraps the close attempt in |
|
I rechecked this today while it is waiting for review. The ownership point is the writer mutex after The patch only makes unlock unconditional around the existing close attempt; it does not change the closed-state transition or the best-effort close behavior. DCO is still green. |
Fixes #25.
Shared_writer_fd.closeacquired the writer mutex but released it only whenUnix.closeraised. On the usual successful path, later writers waited forever before they could observeClosed.Wrap the best-effort close in
Fun.protectso the mutex is always released. The regression closes a shared writer and then checks that a later write raisesClosedinstead of blocking.Validation:
git diff --checkppx_jane, then randune build @all -j2; compilation reaches the repository sources but the public toolchain cannot compile existingDomain.SafeandSys.Safeuses and existing warning-as-error findings, sodune runtestis not reachable outside the Jane Street build environment