aborting (or finishing) pending operations in GPGME

Stephane Corthesy stephane at sente.ch
Mon Jan 14 11:44:01 CET 2002


I tried to implement async calls in GPGME ObjC wrapper classes, and  
felt on the problems you mentioned here:

> However, the gpgme_op_foobar_start form of the operations in the  
second class
> is quite unusable.  The gpgme.h header describes the gpgme_op_foobar as 
> convenient functions, but they are a necessity, because gpgme_op_foobar 
> can't be implemented using the _start form and just the public  
interface of
> gpgme.  There are two reasons for that:
>
> 1. The pending flag is never reset and not resettable.
> 2. The resulting error value of the operation is not calculable via the 
>    public interface.  It is retrieved through internal interfaces. 

(I needed to make some more tests before sending you feedback on  
this issue)

I find the op_start calls useful, combined with gpgme_wait(): user  
can start operations in a secondary thread, blocks the secondary  
thread with gpgme_wait() until end of operation, and notify back in  
the main (caller) thread; or he can cancel the operation. gpgme only  
needs to be thread-safe, and provide a way for user to get status on  
the operations. Of course, we could do the same with the sync  
calls...

> The gpgme_wait does of course not
> work for this; the scheduling must implemented in another way

Why doesn't it work? Seemed to work fine in my case.

Stephane




More information about the Gnupg-devel mailing list