Forwarding a Debian bug report. Citing:
Starting asynchronouse call and then canceling it with gpgme_cancel do cause
gpgme_wait() return Canceled error but leaves gpg process working and
finishing the call.
Attached is a slightly modified t-genkey test from the gpgme source showing
the problem.