fix thread blocked by expeditor
original commit: fa7516efa7bee58b2a7307e504ed97fc3bc69731
This commit is contained in:
parent
35013d29fb
commit
6d7f4089e1
|
@ -95,8 +95,19 @@ static ptr s_ee_read_char(IBOOL blockp) {
|
|||
S_LastErrorString());
|
||||
if (NumberOfEvents == 0) return Sfalse;
|
||||
}
|
||||
|
||||
if (!ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead))
|
||||
|
||||
#ifdef PTHREADS
|
||||
ptr tc = get_thread_context();
|
||||
deactivate_thread(tc);
|
||||
#endif
|
||||
|
||||
BOOL succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||
|
||||
#ifdef PTHREADS
|
||||
reactivate_thread(tc);
|
||||
#endif
|
||||
|
||||
if (!succ)
|
||||
S_error1("expeditor", "error getting console info: ~a",
|
||||
S_LastErrorString());
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user