aborting (or finishing) pending operations in GPGME
Werner Koch
wk@gnupg.org
Tue Jan 15 16:58:02 2002
On Tue, 15 Jan 2002 16:25:16 +0100, Marcus Brinkmann said:
> The stubs in posix-sema.c are empty. This certainly needs to be fixed at
Given that most software is not MT (for good reasons) I won't like to
implement this unconditionally; it might be better to add a configure
flag and build 2 vesions of the library - gpgme-config can then be
used to figure out the needed one.
Or should we provide an additional object file to shortcut the locking
stuff?
> some time, but it will take some effort to go through gpgme and to add
> proper locking. That doesn't mean that you can't use it in a threaded
There are not many places which need to be changed. gpgme_wait()
needs to be changed of course, the fail_on_pending_request macro and
the stuff which fires up the backend.
> environment, you just have to be very careful. What you describe above is
> probably safe, but I didn't check (cancel just sets an int from zero to some
> non-zero value).
As long as an object is only used by one thread it should be save.
gpgme_cancel() should work from all threads.
--
Werner Koch Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions -- Augustinus