+void communicator::receiver1(msg_comm_t& comm, m_task_t& task, const char* mbox)
+{
+ MSG_comm_destroy(comm);
+ if (strcmp(MSG_task_get_name(task), "finalize")) {
+ XBT_DEBUG("received message on %s", mbox);
+ xbt_mutex_acquire(mutex);
+ received.push(task);
+ xbt_cond_signal(cond);
+ xbt_mutex_release(mutex);
+ task = NULL;
+ comm = MSG_task_irecv(&task, mbox);
+ } else {
+ XBT_DEBUG("received finalize on %s", mbox);
+ MSG_task_destroy(task);
+ task = NULL;
+ comm = NULL;
+ }
+}
+