| Ticket UUID: | 83116f5e05430902cdeb59758f6d53f57fafac3d | ||
| Title: | Tcl_Async* documentation wrong | ||
| Type: | Bug | Created on: | 2018-06-08 22:40:18 |
| Submitter: | chw | Assigned to: | nobody |
| Subsystem: | 69. Other | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2018-06-08 22:40:18 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | 8.6 and later | ||
| Description: | ||||
|
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. | ||||
