summaryrefslogtreecommitdiff
path: root/io/actors.io
blob: 9b639444ee1ad43dfd95100c9101d872ae5aeb84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
slower := Object clone
faster := Object clone

slower start := method(wait(2); writeln("slowly"))
faster start := method(wait(1); writeln("quickly"))

slower @@start
faster @@start
wait(3)


futureResult := URL with("http://google.es") @fetch
writeln("Do something immediately while fetch goes in bg...")
writeln("This will block until the result is available.")

writeln("Fetched ", futureResult size, " bytes")