Alarm.com Interview Question

How to make something thread safe