Hi,
I've started reorganizing the old IOCPsock code I wrote about 20 years
ago and I would like to add some shared stuff in one file to the core.
https://github.com/davygrvy/iocpsock/blob/main/tclWinIocp.c
It isn't complete (by far) and will eventually include a test suite for
the lock-free FIFO queue routines.
Should I ask on tclcore mailing list?
You have perhaps seen the discussion yesterday on the exception channel proposal.
Your design was seen as superiour, but the ship sailed long ago.
Exceptions are reported be a read event and the read event should first check for any exception/error.
To my knowledge, a socket connect error is reported by read and write
events and the program should first check
fcopfigure -error
for any exceptions.
Would that also be a feasable design for you?
Would that also be a feasable design for you?
No. Not for errors. That isn't the meaning of TCL_EXCEPTION. It is an alternate path like interrupts in GPIB, TCP urgent flag, QOS notices, etc
TCP urgent flag
On 6/30/2026 3:17 AM, David Gravereaux wrote:
TCP urgent flag
For WSAAsyncSelect, that's the FD_OOB trigger.
Tcl provides us the ability to manage these protocol specific incoming things outside the normal read and write sides of a uni-directional communications link though TCL_EXCEPTION
On 6/30/2026 4:18 AM, David Gravereaux wrote:
On 6/30/2026 3:17 AM, David Gravereaux wrote:
TCP urgent flag
For WSAAsyncSelect, that's the FD_OOB trigger.
Tcl provides us the ability to manage these protocol specific incoming
things outside the normal read and write sides of a uni-directional
communications link though TCL_EXCEPTION
Ok, the long winded reply...
Let's examine GPIB with its very important SRQ/RQS interrupts for how devices on the bus tell the host (CIC) that something requires attention with a status byte (STB) from the SPOLL that cleared the SRQ.
https://www.ni.com/en/support/documentation/supplemental/06/serial- polling-and-srq-servicing-with-ni-488-2-software-and- labv.html#section-392030912
"Because these bit definitions are not consistent among instrument
vendors, the method for determining the cause of a service request
varies with each device."
It might be the MAV bit in IEEE-488.2-1987 spec'd units, or a list of
many things that are usually device specific that require scripting. For
my pre-1987 spec'd Tektronix 5000 series plugins, MAV is bit 4, but only when bit 7 is clear.
If I was to use the non-blocking calls for read/write, those would be ibrda() and ibwrta() rather than the blocking Send() and Receive() in
the multidevice API.
https://linux-gpib.sourceforge.io/doc_html/reference-function-ibwrta.html
That would then make [read $gpib] and [puts $gpib {}] only initiate the calls. I would have to retrieve the results of the operation through [fileevent $gpib read/write] after ibwait(..,CMPL) which has to be
serviced by a separate thread that eventually works its way through to Tcl_ChannelNotify(..,TCLREADABLE|TCL_WRITEABLE).
in this place, [fconfigure -error] is useful to let us know of the last operation and highly fits the model.
I really want all three.
Could we copy all this to a RFE ticket on Tcl core?Sure, no prob. I don't know how things work now
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,126 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 49:09:12 |
| Calls: | 14,414 |
| Calls today: | 2 |
| Files: | 186,400 |
| D/L today: |
10,326 files (2,795M bytes) |
| Messages: | 2,548,842 |
| Posted today: | 1 |