protected void destroy() {
        
        for  (IOThread it: io_threads) {
            it.stop();
        }
        for  (IOThread it: io_threads) {
            it.destroy();
        }

        if (reaper != null)
            reaper.destroy();
        term_mailbox.close();
        
        tag = 0xdeadbeef;
    }