Skip to content

Commit f465e95

Browse files
committed
MVar uses synchronization layer.
1 parent a2d4195 commit f465e95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/concurrent/mvar.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'concurrent/concern/dereferenceable'
2+
require 'concurrent/synchronization'
23

34
module Concurrent
45

@@ -34,9 +35,9 @@ module Concurrent
3435
# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794).
3536
# In Proceedings of the 23rd Symposium on Principles of Programming Languages
3637
# (PoPL), 1996.
37-
class MVar
38-
38+
class MVar < Synchronization::Object
3939
include Concern::Dereferenceable
40+
safe_initialization!
4041

4142
# Unique value that represents that an `MVar` was empty
4243
EMPTY = Object.new

0 commit comments

Comments
 (0)