def close_thread(pipe): time.sleep(0.2) pipe.close()
def delay_thread(pipe): pipe.feed('a') time.sleep(0.5) pipe.feed('b') pipe.close()