Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rnapier/rncoalesce

Coalescing timer
https://github.com/rnapier/rncoalesce

Last synced: 2 days ago
JSON representation

Coalescing timer

Awesome Lists containing this project

README

        

Configure this object by providing it a block and a timeout. Once you
call `fireWhenExpired`, the object is "armed." As long as you keep
calling `fireWhenExpired` before the timeout, it will keep delaying.
When the timer expires, it will execute the block.
After firing, it will not fire again until `fireWhenExpired` is called,
and the timer expires.
While this object is armed, it self-retains until it fires. So if you
release this object, and it would otherwise be deallocated, it will
still perform the block after the timeout and then deallocate.