Ct_user_exit ct_install_post_function( Ct_user_exit func );
Immediately after invoking each thread's own callback function, the scheduler invokes the post-thread user exit, if one is installed, passing it the same void pointer that it passed to the thread's own callback function.
A post-thread user exit executes fully in the context of the thread preceding it. For example, if the user exit calls ct_self(), it receives the same return value that the preceding thread would have received. It can terminate that thread by calling ct_exit(). Because it receives the same void pointer as the thread's own callback function, it can access the same data.
If the application saves the return value of ct_install_post_function(), it can restore the previous user exit.
The application can disable whatever post-thread user exit is in effect by passing a null pointer to ct_install_post_function().
See also: ct_install_pre_function()