Flash3388 / FlashLib

A robotics development framework
BSD 3-Clause "New" or "Revised" License
10 stars 0 forks source link

Flashboard Updater Blocking Tasks #19

Closed tomtzook closed 7 years ago

tomtzook commented 7 years ago

The Flashboard updater thread encounters a problem with blocking tasks which stop the updater for too long. The blocking tasks are the retreival of the ip address for communications (both comm and cam). If the remote is not reachable, this task could take up to 5 seconds. If only using a part of flashboard communications, the other will cause issues.

An option to solve this is to create a separate thread for heavy duty tasks. But! this means another thread, which might be too much already. It is possible to manually avoid such issue by making sure that when not using a part of flashboard, its defined host name is an empty string.

tomtzook commented 7 years ago

Added an address retrieval thread which runs and retrieves the address from host names. To save resources, the thread is put into long sleep cycles when not needed.