Hi, team,

The background here is we'd like to clean up a thread local cache after
some timeout. Unfortunately, we're lacking an API to schedule a
continuation to the current thread.

There are two ways I can think of to achieve this.
One is a pair of new APIs *TSContScheduleToCurrentThread(TSCont contp,
ink_hrtime timeout) *and* TSContScheduleToCurrentThreadEvery(TSCont contp,
ink_hrtime every).*
Or we can append the TSThreadPool enum with a new entry called
*TS_THREAD_CURRENT
*and add the logic into *TSContSchedule() *and *TSContScheduleEvery(). *
The issue with the latter solution is *TS_THREAD_CURRENT* doesn't quite fit
in TSThreadPool. If we change TSThreadPool to some more proper name, the
change will not be backward compatible.

Please feel free to share your insights.  Any ideas would be much
appreciated!


Thanks,
Zizhong

Reply via email to