Open sabify opened 1 year ago
This conceptually would resolve a lot of issues for me that currently require extensive work-arounds.
Seems a clean solution and it'd be really helpful also in my case @sabify
Do you know by chance if (and how) is possible to access the AsyncQueue
s given an AsyncDevice
with the current crate API?
This pull request will remove the requirement for obtaining an unnecessary mutable reference to self in AsyncRead and AsyncWrite, as it is already protected by locks within the code. It will also include methods like
send
andrecv
in the async API that can be used concurrently by only sharing a reference to the queue.The method
queue
will be replaced byqueue_mut
, as it is intended to be. Additionally, two more methods will be added:queue
, which returns a reference to the queue, andqueues
, which transmute thedevice
to the vector of its queues.