A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model-checker : update tesh
[simgrid.git]
/
examples
/
lua
/
chord
/
chord.lua
diff --git
a/examples/lua/chord/chord.lua
b/examples/lua/chord/chord.lua
index
77e19d9
..
523b150
100644
(file)
--- a/
examples/lua/chord/chord.lua
+++ b/
examples/lua/chord/chord.lua
@@
-65,7
+65,7
@@
function node(...)
while now < max_simulation_time do
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
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
" 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
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
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
my_node.comm_recv = simgrid.task.irecv(my_node.id)
if not task then