mikebaum / RxUI

A toolkit for reactive (event/stream) based UI development on the JVM
Apache License 2.0
0 stars 0 forks source link

Add debounce operator #33

Closed mikebaum closed 8 years ago

mikebaum commented 8 years ago

Updated EventStream to add a debounce operator as per Issue #31.

mikebaum commented 8 years ago

In addition to creating a new operator, I did some big refactoring around the ThreadCache which is now named EventLoop and has additional functionality. There are two implementations of the EventLoop interface, one for Swing and the other for JavaFx.

The debounce operator has been made reentrancy proof, in that time shifted events will respect the Dispatch bubble they were in when the event that is bounced was originally emitted. This change should work universally for any time shifted event emission, since the update was made to the EventLoop.schedule(Runnable, long, TimeUnit) method.

Removed the unnecessary Scheduler interface.