title: How can I execute batches of requests simultaneously in python?
body: <p>I'm using the Reddit api to upvote some subreddits. I'd like to upvote multiple subreddits simultaneously, using the <code>praw</code> library to interact with the reddit api.</p>
  
  <p>I want to upvote the 27 "hot" and "rising" posts of /r/bookclub:</p>
  
  <pre><code>subreddit = reddit.subreddit("bookclub")
  
  for submission in subreddit.hot(limit=27):
      submission.upvote()
  
  for submission in subreddit.rising(limit=27):
      submission.upvote()
  </code></pre>
  
  <p>I'd like to use async or multiprocessing to do this faster. I used the <code>grequests</code> library to do all the <code>.upvote()</code> at once, and it's working so far, but I'm not sure if it's really better:</p>
  
  <pre><code>subreddit = reddit.subreddit("bookclub")
  
  hot_upvotes = (grequests.get(submission.upvote()) for submission in subreddit.hot(limit=27))
  grequests.map(hot_upvotes)
  
  rising_upvotes = (grequests.get(submission.upvote()) for submission in subreddit.rising(limit=27))
  grequests.map(rising_upvotes)
  </code></pre>
  
  <p>Both versions upvote the subreddit. What I am wondering is if it is possible to run the <code>hot_upvotes</code> and <code>rising_upvotes</code> portions at the same time?</p>