gpgme_waitcontinues the pending operation within the context ctx. In particular, it ensures the data exchange between GPGME and the crypto backend and watches over the run time status of the backend process.
If hang is true, the function does not return until the operation is completed or cancelled. Otherwise the function will not block for a long time.
The error status of the finished operation is returned in status if
gpgme_waitdoes not return
The ctx argument can be
NULL. In that case,
gpgme_waitwaits for any context to complete its operation.
gpgme_waitcan be used only in conjunction with any context that has a pending operation initiated with one of the
gpgme_op_trustlist_start(for which you should use the corresponding
gpgme_op_*_nextfunctions). If ctx is
NULL, all of such contexts are waited upon and possibly returned. Synchronous operations running in parallel, as well as key and trust item list operations, do not affect
In a multi-threaded environment, only one thread should ever call
gpgme_waitat any time, irregardless if ctx is specified or not. This means that all calls to this function should be fully synchronized by locking primitives. It is safe to start asynchronous operations while a thread is running in
The function returns the ctx of the context which has finished the operation. If hang is false, and the timeout expires,
NULLis returned and
*statuswill be set to 0. If an error occurs,
NULLis returned and the error is returned in