a thread receives works and generate messages

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>