Pthread-based Worker Thread Pattern