Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created October 4, 2011 22:22
Show Gist options
  • Save Sciss/1263019 to your computer and use it in GitHub Desktop.
Save Sciss/1263019 to your computer and use it in GitHub Desktop.
Test file for FutureResult -- throws java.lang.NoSuchMethodError when `TIMEOUT` case is entered.
object FutureTest
def run() {
import actors.{TIMEOUT, Actor}
import Actor._
actor {
val ev = FutureResult.event[ Int ]()
println( "spawing actor 2" )
actor {
reactWithin( 3000L ) {
case TIMEOUT => ev.set( 33 )
}
}
println( "entering await" )
val res = ev.apply()
println( "result = " + res )
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment