trafficserver
trafficserver copied to clipboard
Add new API TSContScheduleOnEntirePool and TSContScheduleEveryOnEntirePool
Adds two new APIs that allow scheduling continuations on all threads of a certain thread type (e.g. ET_NET, ET_TASK):
std::vector<TSAction> TSContScheduleOnEntirePool(TSCont contp, TSHRTime timeout, TSThreadPool tp)
std::vector<TSAction> TSContScheduleEveryOnEntirePool(TSCont contp, TSHRTime every, TSThreadPool tp)
The behavior is similar to EventProcessor::schedule_spawn()
.
[approve ci]
[approve ci]
I don't like the double
vector
implementation. I think it would be reasonable to have the core methods returnTSAction
instead ofTSEvent
, because
The latter can be extracted from the former.
It avoids the double allocation.
It hides the pointer hacking in the Event system instead of the API implementation.
That does sound better, I'll change that. Did it this way since the other ones had that part in the API.
@zwoop I think this is ready for another review
[approve ci format]
[approve ci autest]