Hi Roger,
Thanks for the fast response:
>I quite quickly moved away from SIG_IO completely and used a
>select-based interface which is more reliable, but requires
>coordination between all the devices you want to wait for. Much
>later support for that went into the system under the name of
>sys_device_wait.
My first effort was indeed based on using sys_device_wait. And it was 100%
reliable. But I couldn't use XVed at the same time - and that's a
key design goal.
>Indeed, most X-based application sit in a select all the time they
>aren't doing anythign else, but Poplog X can't do this, so it polls
>the X socket connection periodically (10 times a second?) to see if
>there's any work to do. You may well have more luck trying the same
>thing - set a timer and use sys_device_wait to poll (ie with wait
>argument false) the devices you are interested in every so often.
This is plausible - but introduces a possible 100 millisecond delay
on serving a response. Ouch!
This would suggest a difference between development mode, which
allowed the use of XVed, and deployment mode. In deployment mode it
would sit in a select (and XVed would be disabled). In development
mode it would have a periodic check as to whether it had work to do.
Another workaround, I suppose, would be to allow the wait condition
to arise but set a repeating timer to periodically clear it out.
That might well be effective in practice too.
--
Steve
|