From bfdf8014870946d82e23bc092b71ca1bd145c60f Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 13 Nov 2006 12:45:03 +0000 Subject: [PATCH] Replace a "sleep(1)" with a yield so that the orted can reap processes much faster. This commit was SVN r12575. --- orte/mca/odls/default/odls_default_module.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 5856e8355e..9598dd75c1 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -219,8 +219,11 @@ static bool odls_default_child_died(pid_t pid, unsigned int timeout, int *exit_s return true; } - /* Sleep for a second */ - sleep(1); +#if defined(__WINDOWS__) + SwitchToThread(); +#elif defined(HAVE_SCHED_YIELD) + sched_yield(); +#endif } while (time(NULL) < end); /* The child didn't die, so return false */