I'm writing an application in C++ using Qt on Mac. I want to detect drives being mounted and unmounted so I am using the DiskArbitration framework. I registered some callback functions via DARegisterDiskAppearedCallback
and DARegisterDiskDisappearedCallback
but these only fire when there is a runloop.
What is the best way to start a suitable runloop ?
QThread with CFRunLoopRun
(sounds a bit excessive) ?
Please give details, I am not well versed in threads.