ballle98 / AqualinkD

Daemon to control Jandy Aqualink RS pool equipment from any home automation hub (Alexa, Homekit & Siri, Home Assistant, smartthings, domoticz etc) or web browser.
Other
6 stars 2 forks source link

create queue for set_aqualink_PDA_device_on_off #9

Closed ballle98 closed 5 years ago

ballle98 commented 5 years ago

It the user press multiple buttons rapidly it would be better if those get added to a queue so they can potentially be handled by a single thread. Idea is this

  1. add press press to queue
  2. start thread
  3. process queue

Always create a thread, but when a thread becomes active it should see if there is anything in the queue. If not terminate, the action was handled by a previous thread.

ballle98 commented 5 years ago

No longer needed. Next thread picks up where previous left off. no performance impact.