Skip to content

draft: fix execution lock in session#853

Draft
jordanrfrazier wants to merge 2 commits intomainfrom
deadlock-execution
Draft

draft: fix execution lock in session#853
jordanrfrazier wants to merge 2 commits intomainfrom
deadlock-execution

Conversation

@jordanrfrazier
Copy link
Collaborator

Still issues around sending the future across threads, I think. Also had to use the tokio::sync::Mutex in order to hold the lock across the await, but I'm not sure that this is the correct pattern we should follow, as it may still result in a deadlock if we never receive a new batch from next.

@cla-bot cla-bot bot added the cla-signed Set when all authors of a PR have signed our CLA label Nov 8, 2023
#[derive(Clone)]
pub(crate) struct Execution {
execution: Arc<Mutex<Option<RustExecution>>>,
execution: Arc<Option<RustExecution>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given the difficulties, it seems like we may be better off having submitting an execution return a pair of Execution, StopChannel. Then we can leave the mutex in the execution code, but interact with the stop channel without locking it. Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I guess so 😞 . I'll try that route

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Set when all authors of a PR have signed our CLA sparrow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants