Skip to content

feat: task management #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 31, 2025
Merged

feat: task management #20

merged 12 commits into from
Jan 31, 2025

Conversation

prestwich
Copy link
Member

@prestwich prestwich commented Jan 29, 2025

Task management system, to allow customization and control of the runtime. Also simplifies cleanup in pubsub tasks, and ensures that route futures can be cancelled efficiently when a client disconnects

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@prestwich prestwich marked this pull request as ready for review January 29, 2025 21:03
@prestwich prestwich requested a review from Evalir January 29, 2025 21:04
@@ -107,19 +119,18 @@ impl ConnectionManager {
) -> (RouteTask<T>, WriteTask<T>) {
let (tx, rx) = mpsc::channel(self.notification_buffer_per_task);

let (gone_tx, gone_rx) = oneshot::channel();
let tasks = self.root_tasks.child();
Copy link
Member Author

Choose a reason for hiding this comment

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

connections each get their own task set, which work is spawned onto. this work is automatically cancelled when the connection goes away 😎

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

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

immaculate docs

@prestwich prestwich merged commit ba0eb69 into main Jan 31, 2025
5 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.

2 participants