impl Send for Action client goals

This commit is contained in:
Martin Dahl 2021-08-19 14:06:50 +02:00
parent cf2006d6c1
commit 80c0db3f35
4 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
[package] [package]
name = "r2r" name = "r2r"
version = "0.3.7" version = "0.3.8"
authors = ["Martin Dahl <martin.dahl@gmail.com>"] authors = ["Martin Dahl <martin.dahl@gmail.com>"]
description = "Minimal ros2 bindings." description = "Minimal ros2 bindings."
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"

View File

@ -10,6 +10,8 @@ where
client: Weak<Mutex<WrappedActionClient<T>>>, client: Weak<Mutex<WrappedActionClient<T>>>,
} }
unsafe impl<T> Send for ClientGoal<T> where T: WrappedActionTypeSupport {}
#[derive(Clone)] #[derive(Clone)]
pub struct ClientGoal<T> pub struct ClientGoal<T>
where where

View File

@ -11,6 +11,8 @@ pub struct ActionClientUntyped {
client: Weak<Mutex<WrappedActionClientUntyped>>, client: Weak<Mutex<WrappedActionClientUntyped>>,
} }
unsafe impl Send for ClientGoalUntyped {}
#[derive(Clone)] #[derive(Clone)]
pub struct ClientGoalUntyped { pub struct ClientGoalUntyped {
client: Weak<Mutex<WrappedActionClientUntyped>>, client: Weak<Mutex<WrappedActionClientUntyped>>,

View File

@ -117,6 +117,7 @@ pub struct WrappedNativeMsgUntyped {
) -> std::result::Result<(), serde_json::error::Error>, ) -> std::result::Result<(), serde_json::error::Error>,
} }
unsafe impl Send for UntypedServiceSupport {}
pub struct UntypedServiceSupport { pub struct UntypedServiceSupport {
pub ts: &'static rosidl_service_type_support_t, pub ts: &'static rosidl_service_type_support_t,
pub make_request_msg: fn() -> WrappedNativeMsgUntyped, pub make_request_msg: fn() -> WrappedNativeMsgUntyped,
@ -140,6 +141,7 @@ impl UntypedServiceSupport {
} }
// For now only the client side is implemented. // For now only the client side is implemented.
unsafe impl Send for UntypedActionSupport {}
pub struct UntypedActionSupport { pub struct UntypedActionSupport {
pub(crate) ts: &'static rosidl_action_type_support_t, pub(crate) ts: &'static rosidl_action_type_support_t,