Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Conversation

@D4ryus
Copy link
Contributor

@D4ryus D4ryus commented Jul 10, 2020

Hi!

The first commit adds a test that fails on current master due to fibers
not getting scheduled again when their port gets closed. This is fixed
by the second commit. I am not sure if we could still run into problems
with the hashv-set! when the scheduled task gets stolen from another
scheduler by steal-work!.

D4ryus added 2 commits July 18, 2020 11:05
Add a test that opens a pipe and spawns a fiber which reads from
it. The pipe then gets closed and the test checks if the fiber gets
scheduled again.
As the FIXME points out, the finalize function may be invoked from a
finalizer-thread. To avoid races with the scheduler thread, spawn a
fiber on the scheduler that handles the fd to cleanup the fd-waiters.

Also ensure that all waiters waiting on the closed fd get scheduled
again, as they would otherwise wait forever.
@D4ryus D4ryus force-pushed the wakeup-on-close-port branch from 241b18a to 21ef73b Compare July 18, 2020 09:13
@emixa-d emixa-d added bug needs-changes This PR isn't quite right yet. no-clue Don't know what the fix would be / whether this fix is correct, but acknowledged. labels Sep 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug needs-changes This PR isn't quite right yet. no-clue Don't know what the fix would be / whether this fix is correct, but acknowledged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants