As Peppe said, QTConcurrent only cancels further processing (if you do map or filter over a sequence). A single item cannot be interrupted.
This is because Threads in general can't be canceled or interrupted.
In C++, you need to manage this yourself. (There was talk about extending C++ with the possibility to interrupt/cancel threads by pushing an exception to a thread, where it would throw, but the details were too hairy to get into the standard.)
For some languages that run a VM (Java, Python) it's doable when that thread is executing Java/Python code, but not when locked on a kernel/native) operation.
So, while(true)
should be while(!m_interrupted)
.