Skip to content

Commit d4dc311

Browse files
committed
Clarify resources section
1 parent b5b90ff commit d4dc311

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

doc/synchronization.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,28 @@ conditions it behaves in
3939
[sequential consistent](https://en.wikipedia.org/wiki/Sequential_consistency)
4040
manner.
4141

42-
Sources:
42+
A memory model sources:
4343

4444
- [Java memory model](http://www.cs.umd.edu/~pugh/java/memoryModel/),
4545
and its [FAQ](http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html)
4646
- [atomic<> Weapons 1](https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-1-of-2)
4747
and
4848
[2](https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-2-of-2)
49-
- [JRuby's wiki page about concurrency](https://github.com/jruby/jruby/wiki/Concurrency-in-jruby)
49+
50+
Concurrent behavior sources of Ruby implementations:
51+
52+
- Source codes.
53+
- [JRuby's wiki page](https://github.com/jruby/jruby/wiki/Concurrency-in-jruby)
54+
- [Rubinius's wiki page](http://rubini.us/doc/en/systems/concurrency/)
55+
56+
> A similar document for MRI was not found. Key fact about MRI is GVL (Global
57+
> VM lock) which ensures that only one thread can interpret a Ruby code at any
58+
> given time. When the GVL is handed from one thread to another a mutex is
59+
> released by first and acquired by the second thread implying that everything
60+
> done by first thread is visible to second thread. See
61+
> [thread_pthread.c](https://github.com/ruby/ruby/blob/ruby_2_2/thread_pthread.c#L101-L107)
62+
> and
63+
> [thread_win32.c](https://github.com/ruby/ruby/blob/ruby_2_2/thread_win32.c#L95-L100).
5064
5165
This memory model was created by: comparing
5266
[MRI](https://www.ruby-lang.org/en/), [JRuby](http://jruby.org/),

0 commit comments

Comments
 (0)