def process_transaction(self, message_before, duration, message_after):
            """One trasaction is just a call to sleep"""
            print "[%d] BEGIN: %s (sleep %fs)" % (thread.get_ident(),
                                                  message_before, duration)
            time.sleep(duration)
            print "[%d] END: %s" % (thread.get_ident(), message_after)
One trasaction is just a call to sleep
recipes/Python/576520_Multithreaded_MultiplexerDemultiplexer_allow/recipe-576520.py