I tried googling this, couldn't find an answer, searched here, couldn't find an answer.  Has anyone looked into whether it's thread safe to write to a Serial() object (pyserial) from thread a and do blocking reads from thread b?
I know how to use thread synchronization primitives and thread-safe data structures, and in fact my current form of this program has a thread dedicated to reading/writing on the serial port and I use thread-safe data structures to coordinate activities in the app.
My app would benefit greatly if I could write to the serial port from the main thread (and never read from it), and read from the serial port using blocking reads in the second thread (and never write to it).  If someone really wants me to go into why this would benefit the app I can add my reasons.  In my mind there would be just one instance of Serial() and even while thread B sits in a blocking read on the Serial object, thread A would be safe to use write methods on the Serial object.
Anyone know whether the Serial class can be used this way?
EDIT: It occurs to me that the answer may be platform-dependent.  If you have any experience with a platform like this, it'd be good to know which platform you were working on.
EDIT: There's only been one response but if anyone else has tried this, please leave a response with your experience.
I have done this with pyserial.  Reading from one thread and writing from another should not cause problems in general, since there isn't really any kind of resource arbitration problem.  Serial ports are full duplex, so reading and writing can happen completely independently and at the same time.
pyserial - possible to write to serial port from thread a, do blocking reads from thread b?