Queues an update function to be applied to the current value. The function receives the current value and returns the new value. Updates are applied asynchronously and serialized: only one update runs at a time. @param updateFn a function from current value to new value
(Function<T, T> updateFn)
| 170 | * @param updateFn a function from current value to new value |
| 171 | */ |
| 172 | public void send(Function<T, T> updateFn) { |
| 173 | Objects.requireNonNull(updateFn, "update function must not be null"); |
| 174 | updateExecutor.execute(() -> applyUpdate(updateFn)); |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Queues an update function and returns an {@link Awaitable} that |
nothing calls this directly
no test coverage detected