Remove sync requirement for action server task - #670
Open
mxgrey wants to merge 1 commit into
Open
Conversation
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Contributor
|
There are a few more places with the same where clause where Task: Future<Output = TerminatedGoal> + Send + Sync + 'staticShould we change all of them?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a teeny tiny PR that removes an unnecessary restriction on action servers.
When I initially implemented the action server API, I naively put both
Send + Syncrequirements everywhere to ensure that objects can be used safely across threads. This is more restrictive than necessary for the async task that needs to be produced by an action server. Async tasks really only need to beSend, notSync. It's worth noting thatBoxFuture, which gets used to encapsulate many async tasks across many different Rust async execution engines, only requiresSendand notSync.This change is backwards compatible for all existing uses of this API, because we are only removing a constraint.