Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: 934bb3a69d721587f74d67c731443655e4bc9a56b14dc0c21ba7c3fcdc739b32
Ticket: de232b49f26da1c18e07513d4c7caa203cd27910
write-only nonblocking refchan and Tcl internal buffers
User & Date: apnadkarni 2024-04-02 03:16:12
Changes

  1. icomment:
    Nathan,
    
    *I've created a new ticket, [ac7592e73c10d04b], for the idle queue starvation that Ashok provided an example of, and also fixed the issue by having tclIO.c/ChannelTimerProc() us the idle queue instead of the standard queue to reschedule itself.*
    
    The following concerns come to mind with this change:
    
    - Changing to the idle queue would seem to have similar effects to changing the SYNTHETIC_TIMER from 0 to a positive number. The comments for that #define specifically warn against that.
    
    - Posting to the idle queue when other file events are posted to the event queue seems like it could lead to the reverse situation where your posted events are starved.
    
    - Given that event processing in `Tcl_DoOneEvent` and its ilk allows filtering based on flags `TCL_FILE_EVENTS|TCL_TIMER_EVENTS|TCL_IDLE_EVENTS` this further confuses what those flags mean. Will your events fire in a TCL_FILE_EVENTS loop?
    
    However, I am not going to spend time chasing the above when I believe the fundamental design itself is flawed, irrespective of whether you use the timer queue or the idle queue.
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"