Reactive worker

Hookless » Adapters » Worker

ReactiveWorker is a reactive adapter that computes its output in the background and then makes it available. The difference from non-reactive implementations is that ReactiveWorker will recompute its output when dependencies change. It will wake up dependent reactive computations when its first value is computed for the first time and whenever it changes. ReactiveWorker is a reactive intermediary. It can be used as a single-value reactive cache. It can be seen as an asynchronous version of ReactiveLazy.

Download

ReactiveWorker is included in core library.

Documentation

See the ReactiveWorker class in javadoc. Since the javadoc is not complete yet, you might want to take a look at comments and implementation in ReactiveWorker.java.