Refactor async backend to solve race condition. The previous implementation relied on multiple locks and conditional variables to send and write at the same time which caused deadlocks in certain cases. The new implementation utilizes the Tokio runtimes ability to split a given Stream into a Read and Write asynchronous objects, that it later manages thus elevating the need for mutex and other types of abstractions.
Description
Refactor async backend to solve race condition. The previous implementation relied on multiple locks and conditional variables to send and write at the same time which caused deadlocks in certain cases. The new implementation utilizes the Tokio runtimes ability to split a given Stream into a Read and Write asynchronous objects, that it later manages thus elevating the need for mutex and other types of abstractions.