-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxIdler throws IllegalStateException when buffer is used #6
Comments
I'm about to head on vacation. I'll try to repro at some point when I have
downtime though.
…On Thu, Jul 20, 2017 at 6:13 AM Audrius Karosevicius < ***@***.***> wrote:
When RxJava2 operator buffer is used like this:
RxJavaPlugins.setInitIoSchedulerHandler(Rx2Idler.create("Test scheduler"));
PublishSubject subject = PublishSubject.create();
subject
.buffer(1, TimeUnit.SECONDS, Schedulers.io())
.subscribe();
RxIdler throws IllegalStateException:
java.lang.IllegalStateException: Already completed
at com.squareup.rx2.idler.DelegatingIdlingResourceScheduler$ScheduledWork.run(DelegatingIdlingResourceScheduler.java:152)
at io.reactivex.Scheduler$Worker$PeriodicTask.run(Scheduler.java:371)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
If this actual RxIdler issue I can provide project to reproduce this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEfU4YtgUPCKLxu2OzntOVs28B4aTks5sPyhEgaJpZM4Od4pl>
.
|
The same goes for
|
The fix is trivial but the implications are very complicated so I don't want to make it blindly. Need more time to investigate. |
@JakeWharton Is there a chance that this will be fixed soon? |
No one is working on it at this time.
…On Wed, Aug 23, 2017 at 6:46 AM Jarek Jankowski ***@***.***> wrote:
@JakeWharton <https://github.com/jakewharton> Is there a chance that this
will be fixed soon?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEYVW_QgIlKHbtb9nLR4eb61-wuMvks5sbAMbgaJpZM4Od4pl>
.
|
Is there any known workaround? |
The same state machine instance gets re-scheduled instead of the underlying
Runnable being wrapped in a new one. And since we only allow forward
progress in the state machine, once you execute once you cannot go
backwards to being un-executed again when this happens.
…On Mon, Sep 11, 2017 at 10:02 AM Jonas Alves ***@***.***> wrote:
Is there any known workaround?
@JakeWharton <https://github.com/jakewharton> perhaps if you explain what
the issue is, somebody will work on it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEXw8SXR9UZssVlgs7hbew_d1IAMNks5shT1wgaJpZM4Od4pl>
.
|
@JakeWharton thanks. You also mentioned complicated implications for a possible fix. Do you remember what was that? |
The obvious fix is to allow the state machine to go backwards, which it
wasn't designed to do, so making that trivial change probably has other
effects.
…On Mon, Sep 11, 2017 at 10:36 AM Jonas Alves ***@***.***> wrote:
@JakeWharton <https://github.com/jakewharton> thanks. You also mentioned
complicated implications for a possible fix. Do you remember what was that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEQ_F2o8fTH5oTX4QKOpTvA0RkOeQks5shUVvgaJpZM4Od4pl>
.
|
@nhaarman I'm seeing this issue with or without initialDelay. In the case of interval, the first tick is emitted, but it never goes beyond that. It does print the doAfterNext statement. In the meantime, I'm using a JUnit rule that I've used in the past, which brings its own issues but at least it doesn't crash in my scenario You can also check ReactiveX/RxAndroid#149 |
Seeing this for |
Any updates on this? |
Any updates? |
1 similar comment
Any updates? |
Made a PR that I believe addresses this issue: #14 Makes the state machine go backwards for periodic work, but AFAICT it should be safe. |
When RxJava2 operator
buffer
is used like this:RxIdler throws
IllegalStateException
:If this actual RxIdler issue I can provide project to reproduce this.
The text was updated successfully, but these errors were encountered: