Make sesison creation thread safe.