From ade3b67e3ce0f0be4cde5a259067e591f14543d1 Mon Sep 17 00:00:00 2001 From: Tomas Mikula Date: Tue, 3 Jun 2014 21:16:28 +0200 Subject: [PATCH] Update Javadoc comments. --- reactfx/src/main/java/org/reactfx/EventStreams.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactfx/src/main/java/org/reactfx/EventStreams.java b/reactfx/src/main/java/org/reactfx/EventStreams.java index e1276ec..80a403a 100644 --- a/reactfx/src/main/java/org/reactfx/EventStreams.java +++ b/reactfx/src/main/java/org/reactfx/EventStreams.java @@ -141,6 +141,11 @@ protected Subscription subscribeToInputs() { /** * Returns an event stream that emits periodic ticks. The returned * stream may only be used on the JavaFX application thread. + * + *

As with all lazily bound streams, ticks are emitted only when there + * is at least one subscriber to the returned stream. This means that to + * release associated resources, it suffices to unsubscribe from the + * returned stream. */ public static EventStream ticks(Duration interval) { return new LazilyBoundStream() { @@ -159,6 +164,12 @@ protected Subscription subscribeToInputs() { * Returns an event stream that emits periodic ticks on the given * {@code eventThreadExecutor}. The returned stream may only be used from * that executor's thread. + * + *

As with all lazily bound streams, ticks are emitted only when there + * is at least one subscriber to the returned stream. This means that to + * release associated resources, it suffices to unsubscribe from the + * returned stream. + * * @param scheduler scheduler used to schedule periodic emissions. * @param eventThreadExecutor single-thread executor used to emit the ticks. */