Skip to content

Commit 5cea838

Browse files
committed
Ensure the C mutex is reclaimed with the stadnard unblocker.
1 parent 6d3a365 commit 5cea838

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/truffle/truffle/cext.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,11 +1640,7 @@ def rb_thread_call_without_gvl(function, data1, unblock, data2)
16401640
}
16411641
end
16421642

1643-
runner = -> {
1644-
Truffle.invoke_primitive(:call_without_c_mutex, function, [data1])
1645-
}
1646-
1647-
Thread.current.unblock unblocker, runner
1643+
Truffle.invoke_primitive(:call_without_c_mutex, ->() { Thread.current.unblock unblocker, ->(){ function.call(data1) } }, [])
16481644
end
16491645

16501646
def rb_iterate(iteration, iterated_object, callback, callback_arg)

0 commit comments

Comments
 (0)