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]
name = "r2r"
version = "0.3.7"
version = "0.3.8"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
description = "Minimal ros2 bindings."
license = "Apache-2.0/MIT"

View File

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

View File

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

View File

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