Using the threading and queue modules