-
- // see if some communications are finished
- while ((index = MSG_comm_testany(node.comms)) != -1) {
- comm_send = xbt_dynar_get_as(node.comms, index, msg_comm_t);
- MSG_error_t status = MSG_comm_get_status(comm_send);
- xbt_dynar_remove_at(node.comms, index, &comm_send);
- DEBUG3("Communication %p is finished with status %d, dynar size is now %lu",
- comm_send, status, xbt_dynar_length(node.comms));
- m_task_t task = MSG_comm_get_task(comm_send);
- MSG_comm_destroy(comm_send);
- if (status != MSG_OK) {
- task_data_destroy(MSG_task_get_data(task));
- MSG_task_destroy(task);
- }
- }