Skip to content

Commit 2430032

Browse files
committed
reduce timeout
1 parent a139fd5 commit 2430032

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pyper/_core/sync_helper/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __call__(self, *args, **kwargs):
3838
tp.raise_error_if_exists()
3939
try:
4040
# Use the timeout strategy for unblocking main thread without busy waiting
41-
if (data := q_out.get(timeout=1)) is StopSentinel:
41+
if (data := q_out.get(timeout=0.1)) is StopSentinel:
4242
tp.raise_error_if_exists()
4343
break
4444
yield data

tests/test_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def f4(a1, a2, a3, data, k1, k2):
1717

1818
def f5(data):
1919
# Make queue monitor timeout on main thread
20-
time.sleep(1.2)
20+
time.sleep(0.2)
2121
raise RuntimeError
2222

2323
def consumer(data):

0 commit comments

Comments
 (0)