| 1 |
// static function test: sporking using instance |
| 2 |
|
| 3 |
public class Foo |
| 4 |
{ |
| 5 |
fun static void foo( string s ) |
| 6 |
{ if( s == "bar") <<< "success" >>>; } |
| 7 |
} |
| 8 |
|
| 9 |
// instantiate a Foo |
| 10 |
Foo f; |
| 11 |
// spork it |
| 12 |
spork ~ f.foo( "bar" ); |
| 13 |
|
| 14 |
// give it a chance to run |
| 15 |
me.yield(); |