Review getActualState()
It seems that sometimes the function Instance::now() does not return the current state. It happens with NomadGUI. Does it come from the zeromq pub/sub? Some events could be lost? If it is the case, one solution would be to poll at a low frequency.
Test: start and kill an application. Follow it using now() in parallel. The workflow should never block.