Skip to content

Tips_Threading

Wiki converter edited this page Sep 24, 2020 · 2 revisions

Tips - Threading

At the moment, the thread safety of PortAudio is technically unspecified and hence platform/implementation dependent.

  • Calls to open and close streams are definitely not thread safe on any platform. This means that if you plan to open and close streams from more than one thread, you will need to provide a locking mechanism to ensure that you don't open or close streams in different threads at the same time.

  • In general, calls to ReadStream and WriteStream on different streams in different threads are probably safe. That means that if you are doing [wiki:TutorialDir/BlockingReadWrite Blocking I/O], one thread may read and write to one stream, and another thread may read and write to another.

Clone this wiki locally