diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-18 03:00:33 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-18 03:00:33 +0000 |
commit | ecd2c08a4c8f9e3881d93131456d3ff066bc5de1 (patch) | |
tree | 5d3330c522f479052350f6dff87e3742c47e66b8 /aclocal.m4 | |
parent | fbad2c55923e2895adafbd5627e1995948fe3e41 (diff) |
thread.c (thread_join_m): handle negative timeouts correctly
Users may subtract and round into negative values when using
Thread#join, so clamp the timeout to zero to avoid infinite/long
timeouts.
Note: other methods such as Kernel#sleep and IO.select will
raise on negative values, but Thread#join is an outlier *shrug*
This restores Ruby 2.5 (and earlier) behavior.
Fixes: r62182 (commit c915390b9530c31b4665aacf27c1adfc114f768e)
("thread.c: avoid FP for Thread#join")
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'aclocal.m4')
0 files changed, 0 insertions, 0 deletions