message queuing and threads