[::thread::send -async] posting order not respected when sending to current thread
|User & Date:||sebres 2018-07-31 12:22:41|
- 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.
- "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.
- Change login to "sebres"
- Change mimetype to "text/x-fossil-wiki"