Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_Async* documentation wrong

Open83116f5e05430902cdeb59758f6d53f57fafac3dCreated 8 years agoUpdated 8 years ago
Descriptionwiki2018-06-08 22:40:18
The Async.3 man page states "These procedures provide a safe mechanism for dealing with asynchronous events such as signals."

Signals here mean POSIX signals, i.e. software interrupts delivered by the kernel to a user process/thread.

The statement in the man page is wrong, when the Tcl core is built with TCL_THREADS w.r.t. the function Tcl_AsyncMark(), which needs to acquire at least one mutex using the POSIX function pthread_mutex_lock(), which is not allowed in a signal context.

OTOH, the statement is correct, when the Tcl core is single threaded, since no potentially blocking system call is involved, but a single flag is set.

Thus, additional wording is required, to describe more precisely the working of Tcl_AsyncMark() et.al. in threaded and non-threaded environments.

Log in (anonymous is fine) to add a comment.