pyserial - possible to write to serial port from thread a, do blocking reads from thread b?

后端 未结 3 1363
误落风尘
误落风尘 2021-02-08 12:47

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 (pyseri

3条回答
  •  不知归路
    2021-02-08 13:04

    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.

提交回复
热议问题