def prepare(self): # Note that asynchronous prepare() does not block data_received, # so we don't use in_method here. self.methods.append('prepare') yield gen.Task(IOLoop.current().add_callback)