Richard Harrison wrote:
I have found that when sending small SML commands to polyml (that take 10s of milliseconds to execute) the output only comes back after about 500ms. This seems to be because threads in polyml on windows wait for 500ms in Processes::ThreadPauseForIO before re-polling for input. Is this correct, and if so can I get around this? (looking at the source code suggests I may be able to send polyml a message to kick it into action at the appropriate time?)
There was a similar issue with Unix and I've reduced the time-out to 100ms in both Unix and Windows in CVS. You could shorten the time out even more if you wanted to.
It would probably be better for the code to use overlapped IO rather than polling. I didn't do this originally because I wanted to maintain compatibility with Windows 95/98 which didn't support overlapped IO. Maybe it's time to change.
David.