This PR collects some patches to improve robustness of the FileDescriptorActivity and to avoid locks in trigger() and breakLoop() calls.
Remove locks from FileDescriptorActivity::trigger(), FileDescriptorActivity::breakLoop() and FileDescriptorActivity::triggerUpdateSets() (contributed by @MagnaboscoL)
Do not rearm the timeout timer if the previous cycle was due to a trigger() call. The previous implementation was waiting for the set timeout period after every interruption, which in theory could lead to the situation that the timeout cycle is never triggered if there is no activity on the file descriptor but the activity is constantly triggered due to operation calls or port callbacks.
The bookkeeping of the m_running flag was buggy and isRunning() might have returned false even though the activity was still processing the step() function.
This PR collects some patches to improve robustness of the
FileDescriptorActivity
and to avoid locks intrigger()
andbreakLoop()
calls.FileDescriptorActivity::trigger()
,FileDescriptorActivity::breakLoop()
andFileDescriptorActivity::triggerUpdateSets()
(contributed by @MagnaboscoL)trigger()
call. The previous implementation was waiting for the set timeout period after every interruption, which in theory could lead to the situation that the timeout cycle is never triggered if there is no activity on the file descriptor but the activity is constantly triggered due to operation calls or port callbacks.m_running
flag was buggy andisRunning()
might have returned false even though the activity was still processing thestep()
function.