No.

If you receive another event_var during your dosomething() function, the global var will change to this new number.

Your best bet is to keep a local var inside the funtion and copy the global far from the event to this local var. That way the global var is also available to receive new numbers and this change will not disturb the value that your dosomething() is working with.