summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorCharles Oliver Nutter <[email protected]>2023-05-19 09:11:43 -0500
committerCharles Oliver Nutter <[email protected]>2023-05-22 20:49:53 -0400
commitf890345c03dc48072167df4bce45bc506dba2a1d (patch)
tree6326c62d19480784d24996d49c3594f8626e4628 /parse.y
parented7c7657ae0065a5007b443d146590e6e6a9dcbe (diff)
Ensure producer threads do not start running early
This test caused issues occasionally on JRuby because it's possible for a producer thread to run to completion before the status checks begin. This results in Thread#status returning false and the =~ call triggering a warning (3.1) or error (3.2) and either emitting thousands of deprecation warnings or failing outright. The patch here introduces a mutex that remains locked until all producer threads are seen to have started. The lock is then released and the test proceeds. This prevents any producers from running to completion, which in turn prevents consumers running to completion, avoiding the warnings or error calling =~ on false. This patch also modifies the status checks to to_s the thread status, preventing any prematurely terminated threads from triggering similar deprecation warnings or missing method errors when =~ is called on nil.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7830
Diffstat (limited to 'parse.y')
0 files changed, 0 insertions, 0 deletions