Skip to content

TimerSet now survives a fork. #573

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

Merged
merged 1 commit into from
Sep 17, 2016

Conversation

nickelser
Copy link
Contributor

This is very similar in spirit to #501: when a fork is detected, immediately:

  • Clear all pending jobs from the queue.
  • Rest the wait condition.

I found this issue while debugging a Gem I am working on which uses a Concurrent::TimerTask behind the scenes. If I started any tasks before a fork, they didn't survive, but the bug was that no more TimerTasks could be started after that.

This allows new TimerTasks to be created after a fork.

@jdantonio
Copy link
Member

God catch! thank you very much for doing this.

@jdantonio jdantonio merged commit dfe645a into ruby-concurrency:master Sep 17, 2016
@nickelser
Copy link
Contributor Author

@jdantonio thanks for merging. My pleasure, thanks for maintaining an excellent library.

@pitr-ch pitr-ch added this to the 1.0.3 milestone Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants