avoid InitWorker twice for main thread

This commit is contained in:
Ricardo Rocha 2011-07-26 15:51:52 +01:00
parent 31b3eeaae6
commit 3345709bdb

View File

@ -1205,9 +1205,11 @@ InitCodes(void)
#include "ihstruct.h" #include "ihstruct.h"
#if THREADS #if THREADS
Yap_InitThread(0); Yap_InitThread(0);
#endif #endif /* THREADS */
InitGlobal(); InitGlobal();
#if !THREADS
InitWorker(0); InitWorker(0);
#endif /* THREADS */
InitFirstWorkerThreadHandle(); InitFirstWorkerThreadHandle();
/* make sure no one else can use these two atoms */ /* make sure no one else can use these two atoms */
CurrentModule = 0; CurrentModule = 0;