interpreter: interpret `with` statement
[nit.git] / lib / pthreads / README.md
1 # POSIX Threads support
2
3 The threads can be manipulated and synchronized using the classes `Thread`,
4 `Mutex` and `Barrier`.
5
6 This group also provides two optional modules with thread-safe collections:
7
8 * `redef_collections` redefines existing collection to make them thread-safe.
9   This incures a small overhead in all usage of the redefined collections.
10 * `concurrent_collections` intro new thread-safe collections.
11
12 Theses services are implemented using the POSIX threads.
13
14 ## Known limitations:
15
16 * Most services from the Nit library are not thread-safe. You must manage
17   your own mutex to avoid conflicts on shared data.
18 * FFI's global references are not thread-safe.
19
20 ## For more information:
21
22 * See: `man pthreads`
23 * See: `examples/concurrent_array_and_barrier.nit`