The "wait" action and runevent action are the only actions that will cause an event to run in the background. The runevent now has a setting to disable that, maybe we should add a similar setting to the wait. I honestly cannot remember why we force an event to run in its own thread if there is a wait action present. I bet if I removed the threading most users would not see a difference.
I think maybe it was added for the case where you wanted to trigger multiple events, say at a specific time, but did not want the first event to hold up processing of subsequent events, like an event with a long 30 second delay. I can see cases where you would want multiple events to run at the same time, say one turns on some z-wave lights and the other turns on some zigbee lights. You would want the events to run in parallel. But there are other cases where you would want them to run serially. Specifying this with some option would be better than relying on the wait action. I would suggest removing the wait action from forcing the event to run in a thread and add a "wait for event to complete" in the event properties. If this is not checked, events run in parallel, else they run serially. By default this is checked so existing configurations are not affected.
Comments?
I think maybe it was added for the case where you wanted to trigger multiple events, say at a specific time, but did not want the first event to hold up processing of subsequent events, like an event with a long 30 second delay. I can see cases where you would want multiple events to run at the same time, say one turns on some z-wave lights and the other turns on some zigbee lights. You would want the events to run in parallel. But there are other cases where you would want them to run serially. Specifying this with some option would be better than relying on the wait action. I would suggest removing the wait action from forcing the event to run in a thread and add a "wait for event to complete" in the event properties. If this is not checked, events run in parallel, else they run serially. By default this is checked so existing configurations are not affected.
Comments?
Originally posted by Walnut2000
View Post
Comment