title: Reading and writing from a single serial port simultaneously from multiple threads
body: <p>I have a serial port which gives me a lot of different data from different pieces of hardware. I need to send different commands to the serial port to receive different kinds of data from it. So, I need to write and read data simultaneously from the port in different functions. Sometimes, I might need to read and write simultaneously from the serial port  in 10 different threads. What is the best way of writing code in this situation for simultaneously reading/writing data from a single port? Threads, sub processes, etc. </p>