Make sure worker methods have a chance to finish their work before the main
program exists.