Skip to content

test(async_io): cover close cancellation and watcher re-arming#14284

Merged
rgrinberg merged 1 commit intoocaml:mainfrom
rgrinberg:push-uplnysukwnls
Apr 22, 2026
Merged

test(async_io): cover close cancellation and watcher re-arming#14284
rgrinberg merged 1 commit intoocaml:mainfrom
rgrinberg:push-uplnysukwnls

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

Add regression tests for [Async_io.close] cancelling a pending readiness waiter and for switching the watched mask on a file descriptor.

The new cases cover:

  • closing an fd while a readiness task is pending
  • re-arming a watcher from read to write
  • switching the same fd from a write watch to a read watch

Add regression tests for [Async_io.close] cancelling a pending readiness
waiter and for switching the watched mask on a file descriptor.

The new cases cover:
- closing an fd while a readiness task is pending
- re-arming a watcher from read to write
- switching the same fd from a write watch to a read watch

Also add socket helper functions needed to exercise these cases on both
Unix and Win32.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit 1995bd5 into ocaml:main Apr 22, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant