-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Milestone
Description
debounce schedules a timeout which then emits the last item if no newer item arrives in the meantime. However, if the processing takes too long, a newer item may arrive and the previous task will get disposed, possibly interrupting the long running work.
The Flowable.debounce and Observable.debounce JavaDocs should mention this property for clarity, something along the lines:
<p>
Delivery of the item after the grace period happens on the (default|given) {@code Scheduler}'s
{@code Worker} which if takes too long, a newer item may arrive from the upstream, causing the
{@code Worker}'s task to get disposed, which may also interrupt any downstream blocking operation
(yielding an {@code InterruptedException}). It is recommended processing items
that may take long time to be moved to another thread via {@link #observeOn} applied after
{@code debounce} itself.