AnyEvent->loop?

Steve Freegard steve.freegard at fsl.com
Wed Feb 16 01:16:27 CET 2011


  Hi all,

I'm new to AnyEvent and loving it so far.

I have one API related question though; when AnyEvent->condvar->wait is 
used for mainloop emulation so it's not possible to use another condvar 
elsewhere without receiving the 'AnyEvent::CondVar: recursive blocking 
wait detected at ..' error.

I realised that I should really be calling the actual event loop 
providers event loop instead in my main program and then my CondVar's 
worked as expected.

Looking at the actual code and not the documentation - it would seem 
that I can simply call:

AnyEvent->loop;

Which will call the event loop of the implementation chosen without 
having to load the relevant module manually and then calls it's loop.

Any reason why this isn't documented?  I've tried it and it works great.

Thanks in advance.

Kind Regards,
Steve.



More information about the anyevent mailing list