Much more efficient use of threads to process requests

Fixed: correct termination for Windows