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

reopening "Add Delay#reconfigure and Fix configuration to be thread safe" #90

Merged
merged 6 commits into from
May 22, 2014

Conversation

pitr-ch
Copy link
Member

@pitr-ch pitr-ch commented May 21, 2014

follow up of #89

@pitr-ch
Copy link
Member Author

pitr-ch commented May 21, 2014

The failed unlock issue should be fixed now.

# initialize the global thread pools if necessary
configuration.global_task_pool
configuration.global_operation_pool
configuration.global_timer_set
Copy link
Member Author

Choose a reason for hiding this comment

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

What was the reason for this early initialization? Couldn't this lead to initialization of pools even if they are not needed?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it could. However the pools themselves are lazy when creating threads (the pure Ruby ones, I'm not certain about the Java ones). So I felt the overhead would be small. Mainly I was just trying for the simplest implementation. I'm fine with delaying pool initialization until they are actually used.

@pitr-ch
Copy link
Member Author

pitr-ch commented May 21, 2014

I've also checked all the other operators (e.g +=), it looks fine.

@pitr-ch pitr-ch mentioned this pull request May 22, 2014
allows to replace the block evaluating to the value with new one
only if a delay is still incomplete?
by replacing ||= operator with Delay instances
use Delay same as in configuration
@jdantonio
Copy link
Member

@pitr-ch Will you be merging this soon? I'd like to include this and the Async updates I am working on in the 0.6.0 release planned for this weekend.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) when pulling 97123b9 on operator into 2160db1 on master.

@pitr-ch
Copy link
Member Author

pitr-ch commented May 22, 2014

@jdantonio Travis passed, if you are ok with the changes it's ready to be merged.

@jdantonio
Copy link
Member

@pitr-ch It looks good to me. You have commit access. Please feel free to merge.

pitr-ch pushed a commit that referenced this pull request May 22, 2014
reopening "Add Delay#reconfigure and Fix configuration to be thread safe"
@pitr-ch pitr-ch merged commit 78af7c6 into master May 22, 2014
@jdantonio jdantonio deleted the operator branch May 23, 2014 03:12
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.

None yet

3 participants