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
Attempt to fix leaks in msg-host_on_off_processes.
[simgrid.git]
/
src
/
msg
/
msg_task.cpp
diff --git
a/src/msg/msg_task.cpp
b/src/msg/msg_task.cpp
index
86ece99
..
c971394
100644
(file)
--- a/
src/msg/msg_task.cpp
+++ b/
src/msg/msg_task.cpp
@@
-216,14
+216,14
@@
msg_error_t MSG_task_cancel(msg_task_t task)
{
xbt_assert((task != nullptr), "Cannot cancel a nullptr task");
- if (task->simdata->compute) {
- simcall_execution_cancel(task->simdata->compute);
- }
- else if (task->simdata->comm) {
- simdata_task_t simdata = task->simdata;
+ simdata_task_t simdata = task->simdata;
+ if (simdata->compute) {
+ simcall_execution_cancel(simdata->compute);
+ MSG_host_del_task(MSG_process_get_host(MSG_process_self()), task);
+ } else if (simdata->comm) {
simcall_comm_cancel(simdata->comm);
- simdata->setNotUsed();
}
+ simdata->setNotUsed();
return MSG_OK;
}