self refers to the module here, not the thread. And renamed :exit to :should_exit to avoid conflicts with the Kernel#exit method.