louiscad
12/12/2017, 10:55 AMMutex
is not reentrant? I'd love to have it for transactional stuff ("reliable writes" in BluetoothGatt). Is there an alternative? FYI, here's how I want to use it: https://gist.github.com/LouisCAD/88d06da6ae1caf04acbf6cd4fc1d5cac#file-gattconnection-kt-L56
EDIT: Added line of the relevant method in the linkelizarov
12/12/2017, 1:53 PMlouiscad
12/12/2017, 2:06 PMwriteCharacteristic(...)
calls (including their callback), and no other things than writes must be done until the writes are commited.
I'm thinking about adding a reliableWriteOngoing
boolean flag to let writeCharacteristic(...)
bypass the already locked mutex, I guess it should work correctly. Do you think I could do better with actors?