Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b3a25c5

Browse files
committedJan 1, 2016
Fixed race when iterating Thread list.
1 parent d43ae9c commit b3a25c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

Diff for: ‎vm/thread_nexus.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ namespace rubinius {
132132
#define RBX_MAX_STOP_ITERATIONS 10000
133133

134134
bool ThreadNexus::locking(VM* vm) {
135+
utilities::thread::SpinLock::LockGuard guard(threads_lock_);
136+
135137
timer::StopWatch<timer::nanoseconds> timer(
136138
vm->metrics().lock.stop_the_world_ns);
137139

0 commit comments

Comments
 (0)
Please sign in to comment.