AqualinkD icon indicating copy to clipboard operation
AqualinkD copied to clipboard

replace busy polling with pthread_cond_wait

Open ballle98 opened this issue 4 years ago • 1 comments

There are several instances where synchronization between the main thread, and the worker threads is done through variables. Polling these variables at different intervals waiting for a state change. A better way to do this is with mutex and conditions.

Using conditions and mutexes prevents race conditions and insures consistent operation. In PDA mode this means a worker can wait on a STATUS message and make a decision then send a keypress in the ACK for the STATUS it was waiting on. No missed transitions, retries, and lost time.

ballle98 avatar Dec 09 '19 18:12 ballle98

updated pull request to version 2.2.2a++

ballle98 avatar Sep 14 '20 20:09 ballle98