Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : update tesh
[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 = 1,200 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   --]]
17 end
18
19 function call_me(from)
20   log:print("I received an RPC from "..from)
21 end
22
23 events.thread("SPLAYschool")
24 start.loop()
25 log:print("Simulation finished")
26