When doing ATAT on tokio, it seems appropriate, and in fact demonstrates a great feature provided with this crate, to tokio::spawn multiple threads for multiple subscribers fetched by BUFFERS.urc_channel.subscribe();
I was not able to do this as seemingly the DynSubscriber struct returned does not feature Send which is necessary for using it as an argument for the async fn to be spawned by tokio.
(As a workaround I currently only use one subscriber and use it in a main thread loop by let urc_handle = subscriber.next_message(); - while doing the client.send() activity in a tokio thread.
dyn PubSubBehavior<urc::Urc> cannot be shared between threads safely ... required by a bound introduced by this call
Suggestion:
while embassy_sync::pubsub::DynSubscriber does not feature Send, embassy_sync::pubsub::Subscriber seemingly does.
When doing ATAT on tokio, it seems appropriate, and in fact demonstrates a great feature provided with this crate, to
tokio::spawn
multiple threads for multiple subscribers fetched byBUFFERS.urc_channel.subscribe();
I was not able to do this as seemingly the
DynSubscriber
struct returned does not featureSend
which is necessary for using it as an argument for the async fn to be spawned by tokio. (As a workaround I currently only use one subscriber and use it in a main thread loop bylet urc_handle = subscriber.next_message();
- while doing theclient.send()
activity in a tokio thread.dyn PubSubBehavior<urc::Urc> cannot be shared between threads safely ... required by a bound introduced by this call
Suggestion: while
embassy_sync::pubsub::DynSubscriber
does not featureSend
,embassy_sync::pubsub::Subscriber
seemingly does.-Michael