Zummy Posted December 20, 2018 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!
NoxMerc Posted December 21, 2018 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.
jca Posted December 21, 2018 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