Closed peendebak closed 6 years ago
Shouldn't the lock also be added to the 'write_data' function?
@mtiggelman Maybe. That depends on whether the write
function in the serial.Serial
is thread safe (e.g. an atomic write). The write
function uses win32.WriteFile
, which seems to be thread safe (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx)
We could add locks just to be safe.
@peendebak I think you're right, then it's not necessary. Just the lock on the read_data should be fine then.
@mtiggelman @Rubenknex