Engine: Make state safe for concurrent use.