Skip to content

Commit f6b29a7

Browse files
committed
Use safe_initialization! instead of ensure_ivar_visibility!
1 parent 5fa0d1c commit f6b29a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/concurrent/async.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def new(*args, &block)
299299
#
300300
# @!visibility private
301301
class AsyncDelegator < Synchronization::LockableObject
302+
safe_initialization!
302303

303304
# Create a new delegator object wrapping the given delegate.
304305
#
@@ -308,7 +309,6 @@ def initialize(delegate)
308309
@delegate = delegate
309310
@queue = []
310311
@executor = Concurrent.global_io_executor
311-
ensure_ivar_visibility!
312312
end
313313

314314
# Delegates method calls to the wrapped object.

0 commit comments

Comments
 (0)