+-- Copyright (c) 2011-2012, 2014. The SimGrid Team.
+-- All rights reserved.
+
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the license (GNU LGPL) which comes with this package.
+
function Slave(...)
if #arg ~= 1 then
while true do
local task = simgrid.task.recv(my_mailbox)
- local task_name = task:name()
+ local task_name = task:get_name()
if (task_name == "finalize") then
simgrid.info("Got finalize message")
break
end
- simgrid.info("Received task '" .. task_name .. "' on mailbox '" .. my_mailbox)
+ simgrid.info("Received task '" .. task_name .. "' on mailbox '" .. my_mailbox .. "'")
task:execute()
simgrid.info("Task '" .. task_name .. "' is done")
end
simgrid.info("I'm done. See you!")
-end -- Slave
+end -- end_of_slave