Tcl package Thread source code

Ticket Change Details

Artifact ID: 05731df680ab375f750827b05804b9f881df986ac585968748640f33a5be6fca
Ticket: b5709ea9060d17f58ba48110351c964b3408e362
[::thread::send -async] posting order not respected when sending to current thread
User & Date: sebres 2018-07-31 12:22:41

  1. Change icomment to:

    Although idle-event is indeed not really good strategy for async send to self.

    But I don't see this as issue.

    Please note:

    • "after" events are timer-events and will be executed as one chunk (if the timer was reached, and in case of after 0 it is always the case);
    • this means - you can not insert in-between 0-timer events, unless you don't generate a timer-event also (I don't really see any advantages by generation of 0-timer event in case of async send).
    • events are cumulated with event source handlers (setupProc/checkProc), so the time where events are reached the evaluation phase is undefined;
    • if the event will be appended directly to thread-queue, then all your timer-events (after 0) will be executed hereafter (because those will reach the event-queue first after sourcing via setupProc/checkProc);
    • asynchronous send to self is not the primary usage in thread-module, so I don't think that "much performance being lost" here.

    Just as loud thoughts.

  2. Change login to "sebres"
  3. Change mimetype to "text/x-fossil-wiki"