From b21930258b66f8ef9287909e3b1e6f7bc7fce477 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christophe=20Thi=C3=A9ry?= Date: Thu, 8 Mar 2012 13:01:50 +0100 Subject: [PATCH] Lua Chord: use the OO notation for comms --- examples/lua/chord/chord.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/lua/chord/chord.lua b/examples/lua/chord/chord.lua index 77e19d94dc..523b15017c 100644 --- a/examples/lua/chord/chord.lua +++ b/examples/lua/chord/chord.lua @@ -65,7 +65,7 @@ function node(...) while now < max_simulation_time do - task, err = simgrid.comm.test(my_node.comm_recv) + task, err = my_node.comm_recv:test() if task then -- I received a task: answer it @@ -271,7 +271,7 @@ function remote_find_successor(ask_to, id) " for id " .. id .. ", waiting for the answer") while true do - task = simgrid.comm.wait(my_node.comm_recv, timeout) + task = my_node.comm_recv:wait(timeout) my_node.comm_recv = simgrid.task.irecv(my_node.id) if not task then @@ -312,7 +312,7 @@ function remote_get_predecessor(ask_to) if task:send(ask_to, timeout) then -- request successfully sent: wait for an answer while true do - task = simgrid.comm.wait(my_node.comm_recv, timeout) + task = my_node.comm_recv:wait(timeout) my_node.comm_recv = simgrid.task.irecv(my_node.id) if not task then -- 2.20.1