[Solved] Postponed rule execution? Do rules get put on stack?

This rule as written is probably the absolute worst thing you can do in OH. The only thing that would make it worse is to add in a ReentrantLock. You have really long sleeps (anything longer than 100 msec is considered too long) and a while loop that could cause the Rule to remain running for minutes to indefinitely. See (OH 1.x and OH 2.x Rules DSL only] Why have my Rules stopped running? Why Thread::sleep is a bad idea for a full explanation and alternatives (i.e. use Timers).

Well, your while loop only checks to see if the door is CLOSED every 30 seconds. That would account for most of the delay. The rest could be accounted for by the fact that it had to wait to get a Thread before it could start running in the first place.

What do you think happens to them? If only five can be running at a given time and you have five actively running, there are two choices:

  1. drop the event and don’t run the Rule
  2. queue up the event and wait for a thread to free up

2 is a much more appropriate response.

See the link above. Tl;dr, use Timers.

Reload the .rules files.