Skip to content

Commit

Permalink
Merge pull request OpenSmalltalk#295 from syrel/fix-sleep-in-worker
Browse files Browse the repository at this point in the history
use Sleep on windows
  • Loading branch information
guillep committed Jun 24, 2021
2 parents 8d09dc3 + 161950f commit f1cdefe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ffi/src/worker/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# include <dispatch/dispatch.h>
#endif

#ifdef _WIN32
# include <Windows.h>
#endif

struct __Worker {
Runner runner;

Expand Down Expand Up @@ -144,8 +148,12 @@ void *worker_run(void *aWorker) {
switch(task->type){
case WORKER_RELEASE:
worker->hasToQuit = true;
//We wait in case we need to receive a callback_return message
sleep(1);
//We wait in case we need to receive a callback_return message
#ifdef _WIN32
Sleep(1);
#else
sleep(1);
#endif
break;

case CALLOUT:
Expand Down

0 comments on commit f1cdefe

Please sign in to comment.