Created
October 4, 2011 22:22
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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