-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
IOSSchedulers for RoboVM #1332
IOSSchedulers for RoboVM #1332
Conversation
RxJava-pull-requests #1234 SUCCESS |
@Override | ||
public Subscription schedule(final Action0 action, long delayTime, TimeUnit unit) { | ||
|
||
ScheduledExecutorService executor = Executors.newScheduledThreadPool(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting a scheduled thread pool for each direct-running task is wasteful, consider implementing the schedule(Action0)
directly and not by forwarding it to the timed overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you may want to check if isUnsubscribed()
at this point eagerly to prevent scheduling on a terminated worker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, GenericScheduledExecutorService
is package private but you need the same structure and single static instance.
Added single static instance of ExecutorService for delayed posting Introduced ScheduledIOSAction to enable CompositeSubscription
RxJava-pull-requests #1270 SUCCESS |
RxJava-pull-requests #1271 SUCCESS |
RxJava-pull-requests #1272 SUCCESS |
Thanks ... I'll get to this in the near future. |
IOSSchedulers for RoboVM
Added support for IOSchedulers for RoboVM
I haven't added unit tests as
It sucks, I know and I'm working on a way to automate this.
Apologies for the double PR -- had to rebranch