tip#609 proposed implementation
Thanks. My only remark is that instead of 2 new flags `TCL_QUEUE_HEAD_ALERT_IF_EMPTY`/`TCL_QUEUE_TAIL_ALERT_IF_EMPTY` I would prefer a single new flag TCL_QUEUE_ALERT_IF_EMPTY which can be combined with the other flags. See: [c7572c6dc42e6380]. This way we don't need the clumsy `Tcl_QueuePositionEx` any more. Please review my proposed changes!
Thanks for making it into a new branch. The solution with a single TCL_QUEUE_ALERT_IF_EMPTY flag is equivalent but please Jan or Harald change the TIP's text and example accordingly. And I think that an additional preprocessor symbol is still needed in order to be able to allow for conditional compilation for older cores without that feature (future/backward/forward/past compatibility).
TIP is adapted to implementation now. Just one question remains: Is the TCL_QUEUE_ALERT_IF_EMPTY flag supposed to work together with TCL_QUEUE_MARK too? If yes, then the implementation should be adapted to allow that. If no, that should be reflected in the TIP and the documentation. That's my only remaining remark.
Thanks!
Searching for TCL_QUEUE_MARK over the entire AndroWish source tree gives few hits and in Tk only. The usage is not bound to multiple threads. Thus, I believe, it is not necessary to have TCL_QUEUE_ALERT_IF_EMPTY for the queue mark operation.
TIP 609 was merged in [901c88bb0e] with the single TCL_QUEUE_ALERT_IF_EMPTY flag and is in Tcl 9.0.
Attachments:
- tip609.diff [download] added by chw on 2021-08-11 12:23:47. [details]