def threaded(callback, listargs):
threads, results = [], []<EOL>job_is_done_event = Event()<EOL>for args in listargs:<EOL><INDENT>args += [results, len(results)]<EOL>results.append(None)<EOL>threads.append(Thread(target=callback, args=args, kwargs=dict(job_is_done_event=job_is_done_event)))<EOL>threads[-<NUM_LIT:1>].setDaemon(True)<EOL>threads[-<NUM_LIT:1>].start()<EOL><DEDENT>while not job_is_done_event.is_set():<EOL><INDENT>if all([not t.is_alive() for t in threads]):<EOL><INDENT>break<EOL><DEDENT>time.sleep(<NUM_LIT>)<EOL><DEDENT>return [r for r in results if r is not None]<EOL>
Returns the result of <callback> for each set of \*args in listargs. Each call
        to <callback> is called concurrently in their own separate threads.

        Parameters:
            callback (func): Callback function to apply to each set of \*args.
            listargs (list): List of lists; \*args to pass each thread.