[argyllcms] Re: Spotread stalling sometimes under Windows
- From: Graeme Gill <graeme@xxxxxxxxxxxxx>
- To: argyllcms@xxxxxxxxxxxxx
- Date: Fri, 13 Nov 2015 12:20:40 +1100
François Simond wrote:
Alright I managed to reproduce a similar issue with a i1 Pro spectro
as sensor instead.
That looks like a very different problem - the USB read of the
raw measurement values has timed out. I've no idea why from
the log (USB hardware problem ?).
So it's not only with the i1 Display Pro driver, more like Windows
spotread behavior on a machine slow or under load.
Linux spotread is unaffected.
Yes. The code is tricky - you need to give it some time
to work properly. Linux/OS X doesn't have the same API issue.
[ The basic problem is that there is no Win32 API to poll
stdin for a character when stdin has been opened by someone else,
and so doesn't have the FILE_FLAG_OVERLAPPED set.
So the hack workaround is to start a thread to block on reading
stdin, and then every 100msec cancel I/O on stdin and kill the thread,
and then do it all over again.
No surprise at all if there is some sort of race condition or loss of
a character if you push that whole thing too hard.
Other related posts: