Skip to content
  • David Edmundson's avatar
    Move CGroup pid fetching callback to the controller · 18937f39
    David Edmundson authored
    The CGroup class started out as a dumb data store, that did some
    fetching of relevant data.
    
    It then gained a more complex async operation. The lifepsan of the
    CGgroup object is managed by the model, so could get deleted whilst the
    runnable was running. QRunnables and non-qobjects leds to a lot of
    potential problems. There was a complex mutex and a wait condition, yet
    it still misses a case only solvable with yet more mutexes.
    
    By moving the callback handling logic to the controller, we can guard
    everything in a safer more Qt manner without any overhead and with
    simpler code.
    
    There is a behavioural change if you call pids whilst things are
    loading, but given a signal is emitted when pids load that's fine.
    
    This class is exported, but the header was never installed.
    Whilst technically it is an ABI break it pragmantically will have no
    impact whatsoever.
    
    BUG: 430615
    18937f39