Skip to content

Commit a2d4195

Browse files
committed
TVar uses synchronization layer.
1 parent cf0997c commit a2d4195

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/concurrent/tvar.rb

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

34
module Concurrent
45

@@ -8,7 +9,8 @@ module Concurrent
89
# @!macro thread_safe_variable_comparison
910
#
1011
# {include:file:doc/tvar.md}
11-
class TVar
12+
class TVar < Synchronization::Object
13+
safe_initialization!
1214

1315
# Create a new `TVar` with an initial value.
1416
def initialize(value)

0 commit comments

Comments
 (0)