def joinall(threads):
 for t in threads:
  t.join(300)
  assert (not t.isAlive()), ('Thread %s hung' % t)

def joinall ( threads ) : for t in threads : t . join ( 300 ) assert ( not t . isAlive ( ) ) , ( 'Thread %s hung' % t )
wait for the greenlets to finish by polling their status .