From 13cb83fa3a8dcfbb55aebf7e24a1c3413680d8ad Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 22 Jul 2012 22:12:39 +0200 Subject: [PATCH] Small time hack in main.d to prevent hanging in OS X --- src/c/main.d | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/c/main.d b/src/c/main.d index 934e4278f..c61a78833 100755 --- a/src/c/main.d +++ b/src/c/main.d @@ -812,6 +812,11 @@ cl_boot(int argc, char **argv) if (process != this) mp_process_join(process); } + /* FIXME! We need to do this because of a problem in GC + * When the thread exits, sometimes the dyld library gets + * called, and if we call dlopen() at the same time we + * cause ECL to hang */ + ecl_musleep(1e-3, 1); } #endif ECL_SET(@'ext::*program-exit-code*', code);