Next Previous Up Top Contents Index

start-sockets

with-socket-thread

Statement macro

with-socket-thread (#key server?)
  body 
end;

Registers the current thread as a blocking socket thread, that is, a thread which will call a socket function that blocks, such as read-element or accept.
The reason for the registration is that Network library shutdown can then synchronize with these threads. The early part of the shutdown sequence should cause the threads to unblock with an <end-of-stream-error> so that they can do whatever application cleanup is necessary. Once these threads have exited, the rest of the shutdown sequence can be executed.
A server socket thread (blocking on accept rather than read-element) notices that the shutdown sequence is underway slightly later, with a <blocking-call-interrupted> condition.

System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index