Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 965 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 965 Bytes

function-queue Scaladex License

function-queue is a collection of classes for queueing up execution of functions in Scala.

AsyncFunctionQueue

Allows you to add functions to a queue which is then executed sequentially in Futures.

val asyncFunctionQueue = new AsyncFunctionQueue()
asyncFunctionQueue.add {
  println("Hello world")
}

AsyncUniqueFunctionQueue

Similar to AsyncFunctionQueue, but the functions added must have a unique key to be accepted into the queue.

val asyncUniqueFunctionQueue = new AsyncUniqueFunctionQueue[String]()
asyncUniqueFunctionQueue.add("1") {
  println("Hello world")
}