Using this macro causes the surrounding asynchronous context to implement !Send. I used it in my cross-platform timer API and I like to ensure everything is non concurrent.
/// Marks asynchronous code as `!Send`.
#[allow(unused)]
pub(crate) macro no_send {
() => {
futures::future::ready(std::marker::PhantomData::<*const ()>::default()).await;
},
}
I'm in inertia with my Agera SDK project, but I'm wondering if I can implement !Sync to the surrounding async?