Open fanck0605 opened 9 months ago
Hi @fanck0605 Thank you for opening this issue; This seems quite similar to #694 and appears to be a threading issue. Using an event loop scheduler should solve the problem:
from reactivex.scheduler import EventLoopScheduler
event_loop = EventLoopScheduler()
result = []
reactivex.range(100_000).pipe(
operators.buffer_with_time_or_count(timespan=0.001, count=10_000),
).subscribe(on_next=lambda x: result.extend(x), scheduler=event_loop)
assert result == list(range(100_000))
Hope this helps
Describe the bug A clear and concise description of what the bug is.
buffer_with_time_or_count lost some data
To Reproduce Steps to reproduce the behavior:
Result:
Expected behavior A clear and concise description of what you expected to happen.
Code or Screenshots If applicable, add a minimal and self contained code example or screenshots to help explain your problem.
Additional context Add any other context about the problem here.