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
Solve the empty_main bug: simply yield main gras thread right after the listener...
[simgrid.git]
/
src
/
gras
/
Msg
/
gras_msg_listener.c
diff --git
a/src/gras/Msg/gras_msg_listener.c
b/src/gras/Msg/gras_msg_listener.c
index
c186224
..
3d74618
100644
(file)
--- a/
src/gras/Msg/gras_msg_listener.c
+++ b/
src/gras/Msg/gras_msg_listener.c
@@
-53,6
+53,7
@@
gras_msg_listener_launch(xbt_queue_t msg_exchange){
arg->incomming_messages = msg_exchange;
arg->listener = xbt_thread_create("listener",listener_function,arg);
+ gras_os_sleep(0); /* give the listener a chance to initialize even if the main is empty and we cancel it right afterward */
return arg;
}