Skip to content
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

Helper method to submit an (interruptible) action to an ExecutorService #2761

Closed
wants to merge 1 commit into from

Conversation

akarnokd
Copy link
Member

Adds two helper methods to Schedulers which performs the correct ScheduledAction hookups when interacting with an ExecutorService.

Replacement for #2592

@akarnokd akarnokd changed the title Helper method to submit an (interruptible) action to an executorservice Helper method to submit an (interruptible) action to an ExecutorService Feb 20, 2015
static final String KEY_INTERRUPT_ON_UNSUBSCRIBE = "rx.scheduler.interrupt-on-unsubscribe";
static {
String interruptOnUnsubscribeValue = System.getProperty(KEY_INTERRUPT_ON_UNSUBSCRIBE);
DEFAULT_INTERRUPT_ON_UNSUBSCRIBE = interruptOnUnsubscribeValue == null || "true".equals(interruptOnUnsubscribeValue);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it is ever good for this to be a global default. Haven't we learned that it causes nasty issues in places like event loops? It seems only appropriate for separate threads, like the IO or NewThread schedulers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add such parameters to the scheduler implementations directly or have them fixed?

@benjchristensen
Copy link
Member

Can you also mark them as Beta? These stand the risk of needing to change after playing with them.

@akarnokd
Copy link
Member Author

I'll add beta.

@akarnokd
Copy link
Member Author

Can't do this right now as it would conflict with #2767.

@akarnokd
Copy link
Member Author

Replaced by #2772.

@akarnokd akarnokd closed this Feb 25, 2015
@akarnokd akarnokd deleted the ScheduleActionHelper branch May 6, 2015 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants