Skip to content

Commit 50c7c01

Browse files
committed
[GR-15260] Ensure the C mutex is reclaimed with the standard unblocker.
PullRequest: truffleruby/804
2 parents bcf794a + 37fba93 commit 50c7c01

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/truffle/truffle/cext.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,11 +1640,10 @@ 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,
1644+
-> { Thread.current.unblock(
1645+
unblocker,
1646+
-> { function.call(data1) }) }, [])
16481647
end
16491648

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

0 commit comments

Comments
 (0)