Refs #5719 - wait for the cancel event being processed

For better feedback for the user that something happened.
Merge pull request #69 from iNecas/issue/5719

Refs #5719 - wait for the cancel event being processed