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

Remove borrow on node.send_output for python #753

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Jan 14, 2025

This PR removes a borrow on send that should make it less adverse to race conditions.

This however still has some issues when concurrently receiving and sending.

See: #746

@phil-opp
Copy link
Collaborator

This seems to include commits of other PRs

@phil-opp
Copy link
Collaborator

make it less adverse to race conditions.

This is a bit misleading, the race condition is that concurrent operations are not allowed right now. This PR removes that limitation. Perhaps you could clarify this in the PR description?

@@ -41,7 +41,7 @@ impl<T> DelayedCleanup<T> {
CleanupHandle(self.0.clone())
}

pub fn get_mut(&mut self) -> std::sync::MutexGuard<T> {
pub fn get_mut(&self) -> std::sync::MutexGuard<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will still error when used concurrently. So the error just happens in a different place now, but concurrent operations are still not possible.

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