Skip to content
Snippets Groups Projects
Commit 8023bad4 authored by Duncan Coutts's avatar Duncan Coutts Committed by Marge Bot
Browse files

waitRead# / waitWrite# do not work for win32-legacy I/O manager

Previously it was unclear that they did not work because the code path
was shared with other I/O managers (in particular select()).

Following the code carefully shows that what actually happens is that
the calling thread would block forever: the thread will be put into the
blocked queue, but no other action is scheduled that will ever result in
it getting unblocked.

It's better to just fail loudly in case anyone accidentally calls it,
also it's less confusing code.
parent c7d3e3a3
No related branches found
No related tags found
No related merge requests found
......@@ -724,16 +724,6 @@ void syncIOWaitReady(Capability *cap,
appendToIOBlockedQueue(cap, tso);
break;
}
#endif
#if defined(IOMGR_ENABLED_WIN32_LEGACY)
case IO_MANAGER_WIN32_LEGACY:
{
StgWord why_blocked = rw == IORead ? BlockedOnRead : BlockedOnWrite;
tso->block_info.fd = fd;
RELEASE_STORE(&tso->why_blocked, why_blocked);
appendToIOBlockedQueue(cap, tso);
break;
}
#endif
default:
barf("waitRead# / waitWrite# not available for current I/O manager");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment