aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scala/async/FutureSystem.scala
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2013-06-25 02:11:16 +0200
committerPhilipp Haller <hallerp@gmail.com>2013-06-25 02:55:26 +0200
commit6f6851c68659eae0d5d04ac9713413a3e592bd90 (patch)
treea9ab691f7bd43c74be21d5e64573b64b47d500af /src/main/scala/scala/async/FutureSystem.scala
parentc13693ec9ab9905966f5768d7ad57bee33248c28 (diff)
downloadscala-async-6f6851c68659eae0d5d04ac9713413a3e592bd90.tar.gz
scala-async-6f6851c68659eae0d5d04ac9713413a3e592bd90.tar.bz2
scala-async-6f6851c68659eae0d5d04ac9713413a3e592bd90.zip
Enable trampolining of async state execution
This replaces the previous body of an `async` block with a while loop: var task$async: Option[() => Unit] = Some(<future body>) while (task$async.nonEmpty) { val task = task$async.get task$async = None task() } This enables executing an `async` block on a single thread by using a future system that blocks upon `await`. This execution mode can be very useful for debugging. The introduced trampolining enables this mode without running into stack overflows.
Diffstat (limited to 'src/main/scala/scala/async/FutureSystem.scala')
0 files changed, 0 insertions, 0 deletions