• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Threading
2
3The Open Screen Library is **single-threaded**; all of its code is intended to be
4run on a single sequence, with a few exceptions noted below.
5
6A library client **must** invoke all library APIs on the same sequence that is
7used to run tasks on the client's
8[TaskRunner implementation](https://chromium.googlesource.com/openscreen/+/refs/heads/master/platform/api/task_runner.h).
9
10## Exceptions
11
12* The [trace logging](trace_logging.md) framework is thread-safe.
13* The TaskRunner itself is thread-safe.
14* The [POSIX platform implementation](https://chromium.googlesource.com/openscreen/+/refs/heads/master/platform/impl/)
15  starts a network thread, and handles interactions between that thread and the
16  TaskRunner internally.
17
18
19
20
21
22