parameters: (self, shards)
docstring: Posts a list of messages to the pool and waits for them to complete.
docstring_summary: Posts a list of messages to the pool and waits for them to complete.
docstring_tokens: Posts a list of messages to the pool and waits for them to complete .
function: def run(self, shards):
          """Posts a list of messages to the pool and waits for them to complete."""
          for message in shards:
              self._messages_to_worker.put(_Message(self._name, message[0], message[1:], from_user=True, logs=()))
  
          for _ in xrange(self._num_workers):
              self._messages_to_worker.put(_Message(self._name, 'stop', message_args=(), from_user=False, logs=()))
  
          self.wait()
function_tokens: def run ( self , shards ) : for message in shards : self . _messages_to_worker . put ( _Message ( self . _name , message [ 0 ] , message [ 1 : ] , from_user = True , logs = ( ) ) ) for _ in xrange ( self . _num_workers ) : self . _messages_to_worker . put ( _Message ( self . _name , 'stop' , message_args = ( ) , from_user = False , logs = ( ) ) ) self . wait ( )