Promise::ES6::IOAsync - Promises/A+-compliant promises for IO::Async


    my $loop = IO::Async::Loop->new();

    my $loop_guard = Promise::ES6::IOAsync::SET_LOOP($loop);

    # Now use Promise::ES6::IOAsync as you would plain Promise::ES6.


This module is deprecated and will go away eventually. Use use_event() instead, as described in Promise::ES6’s documentation.


This module exposes the same functionality as Promise::ES6::AnyEvent but for IO::Async rather than AnyEvent.

Whereas AnyEvent assumes that an event loop is global, IO::Async allows multiple concurrent event loops. In order to accommodate this difference in architecture, this module requires an active IO::Async::Loop object before it can be used. See SET_LOOP() below.


$guard = SET_LOOP( $LOOP )

Sets this module’s active IO::Async::Loop object. This is a internal global; if you try to set a loop while one is already set, an exception is thrown.

This returns an opaque object that, when DESTROY()ed, will clear this module’s internal loop.