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.