Prepare for multiple threads and processes