Files
pyscrlink/scratch_link.py
Shin'ichiro Kawasaki 128786b06b BLESession: Guard getCharacteristics() and getServiceByUUID() with lock
It turned out that bluepy Peripheral's getCharacteristics() and
getServiceByUUID() accesses shared resource with other bluepy APIs. Then
it needs guard with lock in same manner as other bluepy API calls. Guard
them with the lock of the session.

Introduce _get_characteristic() and _get_service() helper functions to
wrap the API calls with lock guard, and replace API calls with them.

Also remove unnecessary getCharacteristics() calls.

Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
2020-06-20 13:36:04 +09:00

24 KiB
Executable File