Skip to content

support async futex#99

Merged
wokron merged 6 commits into
masterfrom
async-futex-sender
Apr 29, 2026
Merged

support async futex#99
wokron merged 6 commits into
masterfrom
async-futex-sender

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented Apr 27, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a coroutine-friendly futex primitive (condy::Futex) and adds corresponding tests and an example demonstrating a producer/consumer queue built on top of it.

Changes:

  • Add include/condy/futex.hpp implementing condy::Futex<T> with async wait() and thread-safe notify_one/notify_all.
  • Add doctest coverage for async futex behaviors (basic notify, notify-all, cross-thread wake, cancellation, and a queue built from futex-based primitives).
  • Add a new queue example and document/build it; export futex.hpp from condy.hpp.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
include/condy/futex.hpp New futex implementation and sender-based wait API.
tests/test_futex.cpp New doctest suite validating condy::Futex behavior and showcasing a futex-based queue.
include/condy.hpp Exports condy/futex.hpp from the umbrella header.
examples/queue.cpp Adds a futex-based producer/consumer queue example using two runtimes.
examples/CMakeLists.txt Builds the new queue example; fixes formatting for futex-semaphore link line.
docs/examples.md Documents the new queue.cpp example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/condy/futex.hpp Outdated
Comment thread include/condy/futex.hpp Outdated
Comment thread tests/test_futex.cpp
@wokron wokron force-pushed the async-futex-sender branch 4 times, most recently from bb004e2 to 1d00f09 Compare April 28, 2026 05:17
@wokron wokron requested a review from Copilot April 28, 2026 05:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/condy/futex.hpp
Comment thread tests/test_futex.cpp Outdated
@wokron wokron force-pushed the async-futex-sender branch from 8d94d9a to 958315d Compare April 28, 2026 08:44
@wokron wokron marked this pull request as ready for review April 29, 2026 06:12
@wokron wokron force-pushed the async-futex-sender branch from 958315d to 14b5759 Compare April 29, 2026 08:03
@wokron wokron merged commit 96a2db2 into master Apr 29, 2026
13 checks passed
@wokron wokron deleted the async-futex-sender branch April 29, 2026 08:13
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.

2 participants