Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URI constructor hangs in a thread #21

Closed
jonathanstowe opened this issue Oct 21, 2015 · 3 comments
Closed

URI constructor hangs in a thread #21

jonathanstowe opened this issue Oct 21, 2015 · 3 comments

Comments

@jonathanstowe
Copy link
Member

On #perl6 just now:

<ollej> I'm having an issue when using the URI module inside a Promise. Unless I've used the URI module before awaiting the result, the program never finishes. Using rakudo 2015.09.
<ollej> I've boiled it down to the following example: await Promise.in(1).then({ say URI.new('http://www.example.com'); });

This seems to be the underlying cause of https://rt.perl.org/Ticket/Display.html?id=126390 - it's likely that there is a deeper underlying problem as it is getting deadlocked on a futex() but this is by way of a placeholder in case anyone has a bright idea to work round it in the meantime :)

@LLFourn
Copy link

LLFourn commented Oct 21, 2015

You can reproduce it more precisely with

perl6 -MIETF::RFC_Grammar -e "await Promise.in(1).then({ say IETF::RFC_Grammar.new('rfc3986'); });"

edit, actually this

 perl6 -MIETF::RFC_Grammar::URI -e "await Promise.in(1).then({ require IETF::RFC_Grammar::URI });" 

jdv added a commit to jdv/uri that referenced this issue Oct 21, 2015
jdv added a commit to jdv/uri that referenced this issue Oct 22, 2015
ronaldxs added a commit that referenced this issue Oct 25, 2015
@ab5tract
Copy link

Does @jdv's patch actually fix this in the end?

@jonathanstowe
Copy link
Member Author

It definitely is "fixed", don't know if it was the patch that did it, the examples above and in the https://rt.perl.org/Ticket/Display.html?id=126390 don't hang any more.

I'd say this was safe to close now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants