You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2022/02/14 02:45:26 UTC
[flink] branch master updated: [FLINK-24880][python] Fix PeriodicThread to handle properly for negative wait timeout value
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 7fb7bdf [FLINK-24880][python] Fix PeriodicThread to handle properly for negative wait timeout value
7fb7bdf is described below
commit 7fb7bdf595df8ca29d32cf7978f2dee219bcce7e
Author: Dian Fu <di...@apache.org>
AuthorDate: Mon Feb 7 11:13:45 2022 +0800
[FLINK-24880][python] Fix PeriodicThread to handle properly for negative wait timeout value
This closes #18640.
---
flink-python/pyflink/fn_execution/utils/operation_utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-python/pyflink/fn_execution/utils/operation_utils.py b/flink-python/pyflink/fn_execution/utils/operation_utils.py
index 3f47ca0..fe780b3 100644
--- a/flink-python/pyflink/fn_execution/utils/operation_utils.py
+++ b/flink-python/pyflink/fn_execution/utils/operation_utils.py
@@ -338,7 +338,7 @@ class PeriodicThread(threading.Thread):
now = time.time()
next_call = now + self._interval
while (next_call <= now and not self._finished.is_set()) or \
- (not self._finished.wait(next_call - now)):
+ (next_call > now and not self._finished.wait(next_call - now)):
if next_call <= now:
next_call = now + self._interval
else: