On Wed, 02 Dec 2015 13:52:24 -0800, timo wrote:
> just about an exception in a
> Promise that nobody is interested in (no await, no .then, ...) are
> silently nommed:

This version has a `.then` but doesn't explode. Is it meant to then?

    use v6;
    my $foo;
    my $promise = Promise.new;
    $promise.keep;  # no difference with break

    # note i added an "await" here.
    $promise.then({
        note 41;
        $foo.does-not-exist;  # hangs? thread dies? no error message!
        note 42;  # never reached!
    }).then: { say "hi" };

    sleep 5;


And this one explodes, but there's no location shown for where the error occurs:

    use v6;
    my $foo;
    my $promise = Promise.new;
    $promise.keep;  # no difference with break

    # note i added an "await" here.
    await $promise.then({
        note 41;
        $foo.does-not-exist;  # hangs? thread dies? no error message!
        note 42;  # never reached!
    });

    sleep 5;

    # zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6  test.p6    41
    # ===SORRY!===
    # No such method 'does-not-exist' for invocant of type 'Any'
    # zoffix@VirtualBox:~/CPANPRC/rakudo$ 

This is Rakudo version 2016.11-220-g29b228c built on MoarVM version 
2016.11-41-gd2139b5

Reply via email to