finish

Function finish 

Source
pub fn finish() -> Result<()>
Expand description

Do uninstall(), terminate the internal “signals-receipt” thread, and wait for that thread to finish.

This is provided in case it’s ever needed to completely clean-up the facility to be like it hadn’t been installed before. It’s unnecessary to use this, just to uninstall the handling. Usually, only using uninstall is desirable so that the “signals-receipt” thread is kept alive for faster reuse when re-installing the handling.

The caller must ensure that all Receivers for the other end of the channel have already been dropped to disconnect the channel, before calling this, to ensure that the “signals-receipt” thread wakes (in case it’s blocked on sending on the channel) to see that it must finish. If this is not done, this might deadlock.