File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,28 @@ conditions it behaves in
39
39
[ sequential consistent] ( https://en.wikipedia.org/wiki/Sequential_consistency )
40
40
manner.
41
41
42
- Sources :
42
+ A memory model sources :
43
43
44
44
- [ Java memory model] ( http://www.cs.umd.edu/~pugh/java/memoryModel/ ) ,
45
45
and its [ FAQ] ( http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html )
46
46
- [ atomic< ;> ; Weapons 1] ( https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-1-of-2 )
47
47
and
48
48
[ 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 ) .
50
64
51
65
This memory model was created by: comparing
52
66
[ MRI] ( https://www.ruby-lang.org/en/ ) , [ JRuby] ( http://jruby.org/ ) ,
You can’t perform that action at this time.
0 commit comments