Zummy Posted December 20, 2018 Share Posted December 20, 2018 Hey guys I'm using a custom loginhandler which uses the Event class but how can I make sure the event doesn't trigger when another Event of the same type is already active? I simply don't want two loginhandlers trying to login, typing in user details at the same time. Thanks! Quote Link to comment Share on other sites More sharing options...
NoxMerc Posted December 21, 2018 Share Posted December 21, 2018 You can't have two events trigger simultaneously if they're both blocking (synchronous) events, and there's really no reason to make a LoginHandler asynchronous, so you should be good to go. Quote Link to comment Share on other sites More sharing options...
jca Posted December 21, 2018 Share Posted December 21, 2018 (edited) 7 hours ago, NoxMerc said: You can't have two events trigger simultaneously if they're both blocking (synchronous) events, and there's really no reason to make a LoginHandler asynchronous, so you should be good to go. If they are asynchronous just execute them in your onStart or a function that is guaranteed to run once and you’ll also be fine. Edited December 21, 2018 by jca Quote Link to comment Share on other sites More sharing options...