mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
Merge pull request #33101 from tchaikov/wip-thread-join
pybind/ceph_argparse: avoid int overflow Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
f66dc746c8
@ -1317,7 +1317,9 @@ def run_in_thread(func, *args, **kwargs):
|
||||
if timeout == 0 or timeout == None:
|
||||
# python threading module will just get blocked if timeout is `None`,
|
||||
# otherwise it will keep polling until timeout or thread stops.
|
||||
timeout = 2 ** 32
|
||||
# wait for INT32_MAX, as python 3.6.8 use int32_t to present the
|
||||
# timeout in integer when converting it to nanoseconds
|
||||
timeout = (1 << (32 - 1)) - 1
|
||||
t = RadosThread(func, *args, **kwargs)
|
||||
|
||||
# allow the main thread to exit (presumably, avoid a join() on this
|
||||
|
Loading…
Reference in New Issue
Block a user