Skip to content

Commit 4b9bed5

Browse files
committed
Remove unused mutex
no instance variables are being reassigned
1 parent 82c1a7f commit 4b9bed5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/concurrent/actress.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def initialize(parent, name, actress_class, *args, &block)
158158
@reference = Reference.new self
159159
# noinspection RubyArgCount
160160
@terminated = Event.new
161-
@mutex = Mutex.new
162161

163162
parent_core.add_child reference if parent_core
164163

@@ -248,15 +247,12 @@ def receive_envelope
248247
def schedule_execution
249248
@one_by_one.post(@executor) do
250249
begin
251-
# TODO enable this mutex only on JRuby
252-
@mutex.lock # only for JRuby
253250
Thread.current[:__current_actress__] = reference
254251
yield
255252
rescue => e
256253
puts e
257254
ensure
258255
Thread.current[:__current_actress__] = nil
259-
@mutex.unlock # only for JRuby
260256
end
261257
end
262258
end

0 commit comments

Comments
 (0)