Functions for scheduling of asynchronous tasks
Scala adaptations of j.u.c.ExecutorService.
A convenience wrapper around Future-based calls.
Wrapper of a java.util.concurrent.ExecutorService implementing the com.gilt.gfc.concurrent.ExecutorService trait.
Wrapper of a java.util.concurrent.ScheduledExecutorService implementing the com.gilt.gfc.concurrent.AsyncScheduledExecutorService trait.
Scala adaptations of j.u.c.ScheduledExecutorService.
Curried version of Scala's Await, for convenience.
Curried version of Scala's Await, for convenience.
AwaitResult(1 second) { futureBasedCall() }
Implicit conversions from java.util.concurrent.ExecutorService and java.util.concurrent.ScheduledExecutorService to com.gilt.gfc.concurrent.ExecutorService and com.gilt.gfc.concurrent.AsyncScheduledExecutorService
Implicit conversions between scala functions and Java equivalents.
For small code blocks that don't need to be run on a separate thread.
Little helpers for scala futures
Little helpers for scala futures
11/Jul/2014 13:25
Simple ThreadFactoryBuilder, analogous to guava ThreadFactoryBuilder
Simple Builder for java.lang.ThreadGroup
Simple Builder for java.lang.ThreadGroup
By default groups have the daemon flag set to false, as such a group will destroy itself if it ever becomes empty after having at least one thread, for example if the factory is used to create threads for an infrequently-used cached thread pool.
09/Feb/2015 12:01
Factory module to build timing out Futures.
Factory module to build timing out Futures.
22-Nov-2014
A convenience wrapper around Future-based calls.
Typically we have an API that returns some Future[OpResult] and we need to set an operation timeout, possibly provide a default value, possibly log how long it took for debugging, maybe retry.
By default it builds a Future[Try[A]] from Future[A]. When default value is provided it builds Future[A] from Future[A]. At the very minimum it'll apply a mandatory timeout but you can add retry logic, call tracer, etc.
It is important to specify type A _at_the_time_of_creation_, type inference doesn't pick it up.
We want to apply timeouts to *all* Futures, so,
...futureBuilder.runWithTimeout(100 milliseconds){ .... something that returns Future ... }