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

TimerSet: cancel/reset task #76

Closed
schmurfy opened this issue May 13, 2014 · 11 comments
Closed

TimerSet: cancel/reset task #76

schmurfy opened this issue May 13, 2014 · 11 comments
Assignees
Labels
enhancement Adding features, adding tests, improving documentation.
Milestone

Comments

@schmurfy
Copy link

In my use case I wanted to use a timer to act as a buffer:

  • i queue data
  • I create or reset a timer so that after X seconds an action is performed
  • if the queue reach or exceed a specific size an action is done and the timer is canceled

After looking at the code TimerSet might be my friend using the Concurrent::timer() api passing my actor as an executor instead of using the global pool but what I am missing is a way to cancel/reset (as in restart its countdown).

PS: Looking through the source code is like wandering in a big fair with interesting things everywhere ;)

@schmurfy
Copy link
Author

looking more into the source code there is another issue which is the one I mentioned in the mailing list: you cannot currently retrieve a reference to the "actor" from inside the object inside/below it.

@pitr-ch
Copy link
Member

pitr-ch commented May 14, 2014

JFYI That is fixed in Actor implementation I am working on, see #73. It is in early stages but already working. I hope it will be ready in few weeks.

@schmurfy
Copy link
Author

thanks for the pointer :)

@jdantonio
Copy link
Member

@schmurfy I added TimeSet as a way to simplify some of the other high-level abstractions. I expected it to evolve so thank you for the input. @pitr-ch has some great ideas regarding more efficient timers so I'm happy to let him run with it and see it evolve.

@jdantonio
Copy link
Member

@schmurfy Can I close this, or would you prefer to keep it open until @pitr-ch gets farther with his work?

@schmurfy
Copy link
Author

I think there is no harm in keeping it open to track it.
If nothing else this might let someone know this is being worked on.

@pitr-ch pitr-ch added this to the 0.8.0 Release milestone Aug 10, 2014
@jdantonio jdantonio modified the milestones: 0.9.0 Release, 0.8.0 Release Jan 14, 2015
@jdantonio jdantonio mentioned this issue Mar 1, 2015
34 tasks
@jdantonio jdantonio modified the milestones: 1.0.0 Release, 0.9.0 Release Mar 1, 2015
@jdantonio jdantonio self-assigned this Mar 1, 2015
@jdantonio
Copy link
Member

Being addressed in #299

@schmurfy
Copy link
Author

nice ! Any rough idea on when it might land into a release ?

@jdantonio
Copy link
Member

It will be in the next release, v0.9.0. I hope to finish the PR today.

@jdantonio
Copy link
Member

PR #299, which implements these features, is now ready to be merged. The PR grew in scope and now included significant refactoring to TimerSet and ScheduledTask. It also include small enhancements to Future and Concurrent.timer.

@jdantonio jdantonio modified the milestones: 0.9.0 Release, 1.0.0 Release May 18, 2015
@jdantonio jdantonio added in progress and removed question An user question, does not change the library. labels May 18, 2015
@jdantonio
Copy link
Member

Merged in #299. Will be released in v0.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding features, adding tests, improving documentation.
Projects
None yet
Development

No branches or pull requests

3 participants