title: How to detect exceptions in concurrent.futures in Python3?
body: <p>I have just moved on to python3 as a result of its concurrent futures module. I was wondering if I could get it to detect errors. I want to use concurrent futures to parallel program, if there are more efficient modules please let me know. </p>
  
  <p>I do not like multiprocessing as it is too complicated and not much documentation is out. It would be great however if someone could write a Hello World without classes only functions using multiprocessing to parallel compute so that it is easy to understand.</p>
  
  <p>Here is a simple script:</p>
  
  <pre><code>from concurrent.futures import ThreadPoolExecutor
  
  def pri():
      print("Hello World!!!")
  
  def start():
      try:
          while True:
              pri()
      except KeyBoardInterrupt:
          print("YOU PRESSED CTRL+C")
  
  
  with ThreadPoolExecutor(max_workers=3) as exe:
      exe.submit(start)
  </code></pre>
  
  <p>The above code was just a demo, of how CTRL+C will not work to print the statement. </p>
  
  <p>What I want is to be able to call a function is an error is present. This error detection must be from the function itself.</p>
  
  <p>Another example</p>
  
  <pre><code>import socket
  from concurrent.futures import ThreadPoolExecutor 
  s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  def con():
      try:
          s.connect((x,y))
          main()
      except: socket.gaierror
           err()
  def err():
      time.sleep(1)
      con()
  def main():
      s.send("[+] Hello")
  with ThreadPoolExecutor as exe:
      exe.submit(con)
  </code></pre>