You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Fei Deng <fe...@verizonmedia.com.INVALID> on 2019/02/28 16:50:56 UTC

API Proposal: TSThreadSetCancelState, TSThreadSetCancelType, TSThreadCancel, TSThreadJoin

void TSThreadSetCancelState(TSThread thread, int state);
void TSThreadSetCancelType(TSThread thread, int type);
void TSThreadCancel(TSThread thread);
void *TSThreadJoin(TSThread thread);

Some plugins have been causing a lot of crashes during ATS shutdown, the
root cause is due plugin threads are not aware of ATS is shutting down and
still trying to do stuff such as initiating ssl handshake. The workaround
right now is to set a flag using the newly implemented
`SHUTDOWN_LIFECYCLE_HOOK`, but there will still be race conditions since
some threads have a very long turnaround time.

These new APIs expose corresponding pthread calls so plugins can have a
better control of its own threads.