A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Lua: add support of closures to the state cloner
[simgrid.git]
/
examples
/
lua
/
SimSplay
/
splay_school.lua
1
require("sim_splay")
2
3
function SPLAYschool()
4
log:print("My ip is: "..job.me.ip())
5
for i = 1000,10000 do
6
log:print(i)
7
end
8
9
events.sleep(5)
10
11
if job.me.ip() == job.nodes[1].ip then
12
rpc.call(job.nodes[2], {"call_me", job.me.ip()})
13
end
14
events.sleep(5)
15
os.exit()
16
end
17
18
function call_me(from)
19
log:print("I received an RPC from "..from)
20
end
21
22
events.thread("SPLAYschool")
23
start.loop()
24