Nexmo interview question

How would you make this variable thread safe?