#NEWLINE# def get( self , timeout = None ) : #NEWLINE# #INDENT# 'Remove and return an item from the queue.\n\n        Returns a Future which resolves once an item is available, or raises\n        `tornado.gen.TimeoutError` after a timeout.\n        ' #NEWLINE# future = Future ( ) #NEWLINE# try : #NEWLINE# #INDENT# future . set_result ( self . get_nowait ( ) ) #NEWLINE# #UNINDENT# except QueueEmpty : #NEWLINE# #INDENT# self . _getters . append ( future ) #NEWLINE# _set_timeout ( self , timeout ) #NEWLINE# #UNINDENT# return future