[Info-vax] Timeout in a write using QUIW.
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Wed Jun 21 17:25:32 EDT 2023
On 2023-06-21 20:45:12 +0000, Jan-Erik Sderholm said:
> Now, here is a technical one...
>
> When doing a *read* from a terminal device using QIOW, one
> can use IO$M_TIMED and supply a timeout value in P3. That
> works perfectly and we use that a lot...
I've never had great success with $QIO and $IO_PERFORM timeouts,
generally or particularly with network devices.
It's all gotten better by appearances, but it was long a source of app
races and of occasional app bugs.
I usually use a timer AST and a $CANCEL for the async read and write
I/O, and a $WAKE.
The AST sets an interlocked "cancel in progress" bitlock in the read or
write $HIBER loop to avoid races, and with a $SCHDWK running to clean
up any lingering $HIBER/$WAKE races lurking.
Threads would be workable here, too.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list