Prevent concurrency issues by blocking until background threads are killed