Skip to content
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

feat: add Semaphore and Notify #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dsherret
Copy link
Member


#[derive(Default)]
pub struct NotifyInner {
pending_notify: usize,
Copy link
Member Author

Choose a reason for hiding this comment

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

I think tokio just uses a boolean here, but I think this makes more sense?

inner: self.0.clone(),
notify_state: Default::default(),
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing really happens with the internal state of Notify until the future is polled. Is that ok?

semaphore: self.clone(),
is_future_dropped: Default::default(),
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

An acquire actually doesn't take place until the future is polled. Is that ok?

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