You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note This is still a draft epic that has not yet been prioritized or staffed.
We never finished the port of the BLED112 device adapter over to asyncio. There are a few nuanced to doing the port that need to be thought through though.
pyserial does not fully support asyncio on all platforms so we can't just ditch the ReaderThread and move to a fully asyncio based solution on Windows at least. See the alternative implementation for how to improve the status quo without needing that.
Moving to asyncio properly will require refactoring how BLED112CommandProcessor handles long-running operations. Right now it uses a hybrid blocking wait with event dispatch while waiting system that is problematic but means moving to a proper asyncio system will need to rework the way commands are sent.
Making sure we retain the current implementation robustness will mean porting over the new implementation to use OperationManager to handle the parallelism of having different coroutines waiting on different ble operations. For example, there could be 3 simultaneous connections in progress each one blocking on a read or a write or a connect operation. We need to make sure that each connection gets its events properly without blocking other connections.
The final result should be that we have a fully asyncio-based bled112 device adapter that should be more performant as well as easier to reason about. Once we have that, we can work on generalizing the coroutine based ble interface to support other kinds of ble controller hardware.
The text was updated successfully, but these errors were encountered:
We never finished the port of the BLED112 device adapter over to asyncio. There are a few nuanced to doing the port that need to be thought through though.
pyserial
does not fully support asyncio on all platforms so we can't just ditch theReaderThread
and move to a fully asyncio based solution on Windows at least. See the alternative implementation for how to improve the status quo without needing that.Moving to asyncio properly will require refactoring how
BLED112CommandProcessor
handles long-running operations. Right now it uses a hybrid blocking wait with event dispatch while waiting system that is problematic but means moving to a proper asyncio system will need to rework the way commands are sent.Making sure we retain the current implementation robustness will mean porting over the new implementation to use
OperationManager
to handle the parallelism of having different coroutines waiting on different ble operations. For example, there could be 3 simultaneous connections in progress each one blocking on a read or a write or a connect operation. We need to make sure that each connection gets its events properly without blocking other connections.The final result should be that we have a fully asyncio-based bled112 device adapter that should be more performant as well as easier to reason about. Once we have that, we can work on generalizing the coroutine based
ble
interface to support other kinds of ble controller hardware.The text was updated successfully, but these errors were encountered: