Merge: Threads
authorJean Privat <jean@pryen.org>
Wed, 29 Oct 2014 19:11:53 +0000 (15:11 -0400)
committerJean Privat <jean@pryen.org>
Wed, 29 Oct 2014 19:11:53 +0000 (15:11 -0400)
commit35d953820b843c75916bf95d4a20233325cfcf46
tree0866030e793e1cd9ccc8bb527fdf1edb784645c9
parent54be77bf27b33aed98b83d0ffb9833e76a2fd1ca
parentd79e61c2f8f25fe60598aa274b39c2c3a1516008
Merge: Threads

Intro the `threads` module with support for POSIX threads, mutex and barriers. Also provides 2 ways to have thread-safe collections: refining existing collections and sub-classing them.

TODO:
* Complete the collection support.
* Modifiy `print` so that printing the user content and the new line is (generally) atomic
* Add more examples/use in real programs
* Reinforce error support.
* Fix compatibility with FFI's global refs.
* Add, when needed, GC_THREADS to `gc_chooser.[c|h]`
* Do not include `gc.h` when not using libgc

ping @egagnon

Pull-Request: #849
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>