END blocks in threads It is possible to add END blocks to threads by using require or eval with the appropriate code. These END blocks will then be executed when the thread's interpreter is destroyed (i.e., either during a ->join() call, or at program termination). However, calling any the threads manpage methods in such an END block will most likely fail (e.g., the application may hang, or generate an error) due to mutexes that are needed to control functionality within the the threads manpage module. For this reason, the use of END blocks in threads is strongly discouraged.