Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the AnyEvent-GnuPG CPAN distribution.

Report information
The Basics
Id: 100753
Status: open
Priority: 0/
Queue: AnyEvent-GnuPG

People
Owner: ZURBORG [...] cpan.org
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: most methods call _read_from_status which calls AnyEvent::Proc::R::readline which calls condvar->recv
This makes this module unusable in a program already using an event loop via AnyEvent but without Coro, i.e. a Gtk2 frontend with a button to encrypt a file calls $gpg->encrypt inside a Gtk2::Button::clicked callback leads to a recursive call to recv.
Am Sa 06. Dez 2014, 15:43:57, JWRIGHT schrieb: Show quoted text
> This makes this module unusable in a program already using an event > loop via > AnyEvent but without Coro, i.e. a Gtk2 frontend with a button to > encrypt a file > calls $gpg->encrypt inside a Gtk2::Button::clicked callback leads to a > recursive call to recv.
Uuhhmm... I don't know how to solve this issue, since I need to wait for a response from gnupg via status fd.
I could use callbacks with Async::Chain. I'll try that.
On Sat Dec 06 16:04:09 2014, ZURBORG wrote:
Show quoted text
> I could use callbacks with Async::Chain. I'll try that.


You should probably have _cb versions of gen_key, import_keys, import_key, export_keys, encrypt, sign, verify and decrypt that take callbacks.  Also using condvar's begin and end might remove the need for the Async::Chain dependency
Am Sa 06. Dez 2014, 16:32:36, JWRIGHT schrieb: Show quoted text
> On Sat Dec 06 16:04:09 2014, ZURBORG wrote:
> > I could use callbacks with Async::Chain. I'll try that.
> > > You should probably have _cb versions of gen_key, import_keys, > import_key, > export_keys, encrypt, sign, verify and decrypt that take callbacks.
First of all, I need to patch AnyEvent::Proc to support callbacks on the elementar wait() method. When CI is in a good state, I'm going to release a new version of AE::Proc and starting to patch AE::GPG. Show quoted text
> Also using > condvar's begin and end might remove the need for the Async::Chain > dependency
Good idea. I'll check this out.
fixed in branch async-chain https://github.com/zurborg/libanyevent-gnupg-perl/commits/async-chain now merged in master branch, v1.001 just released.