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)
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>


Trivial merge