Class SameThreadExecutionContext

java.lang.Object
com.here.platform.data.client.utils.SameThreadExecutionContext

public class SameThreadExecutionContext extends Object
Executes Runnables on the thread calling execute.

WARNING: You will get all kinds of undesirable behaviour if it takes a long time to run and the caller assumes that it will run on another thread.

This execution context is meant to be used to avoid thread scheduling for trivial Future transformations.

  • Constructor Details

    • SameThreadExecutionContext

      public SameThreadExecutionContext()
  • Method Details

    • execute

      public static void execute(Runnable runnable)
    • reportFailure

      public static void reportFailure(Throwable cause)
    • prepare

      public static scala.concurrent.ExecutionContext prepare()