alexandrebarachant / muse-lsl

Python script to stream EEG data from the muse 2016 headset
BSD 3-Clause "New" or "Revised" License
616 stars 182 forks source link

Consider asyncio bleak backend #146

Closed xloem closed 2 years ago

xloem commented 3 years ago

https://github.com/hbldh/bleak is a cross-platform bluetooth interface using python's asyncio infrastructure. The use of asyncio provides for more flexibility for the user. The bleak api has native python implementations for linux, windows, and osx, requiring no calling out to other processes or asking the user for root access.

Using asyncio would probably mean breaking the current api.(although it could be faked with a shim that ran asyncio in another thread, the shim seems a significant chunk of non-muse-related code.) EDIT: in the PR, this shimming is handed off to another package, preserving the current api.