One could set the "blockingness" of $ua as a parameter during $ua's creation.

Unless there's a use case for mixed "blocking" and "non-blocking" behaviour coming from a single $ua object.

Not sure this is the right place to discuss this topic... apologies if not.


On 04/22/2014 04:22 PM, sri wrote:

So there is not much room in the API for passing around promises, and they would most likely need their own methods.

  # Blocking
  my $tx = $ua->get('mojolicio.us');

  # Non-blocking
  $ua->aget('mojolicio.us')->then(sub {
    my $tx = shift;
  });

--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to