-
Notifications
You must be signed in to change notification settings - Fork 8
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
How do I actually use promises? #18
Comments
Hi @ttulttul, we have examples in the README - Usage. Further details can be found in the library documentation. |
Thanks. I got this basically working. Now, I'm confused as to why the promises system seems to be running only one asynchronous request at a time. I was expecting things to go a lot faster, in other words.. Is there a way to control the level of parallelism? |
I can sort of answer my own question here. No, is the simple answer. This library uses Promises, but does not tie into an asynchronous requests library such as grequests. Therefore, the HTTP requests are all blocking. That really sucks. |
@ttulttul: I see what you mean. I've tested the library locally and you are right.
But I've tried their code example locally and it still worked synchronously for me. I'll have to look into this more deeply, but maybe you can try it in the meanwhile? Perhaps I'm doing something wrong. |
Update: I found an ugly workaround, see syrusakbary/promise#45 (comment) I think the promise library has 2 bugs that cause it to fall back to synchronicity. |
Hello @pkopac, I don't have time to test it with my code, but have you tried using the syntax |
@chtseac: thanks for the hint with additional |
Can you guys please provide a practical example of using promises to use the API asynchronously? It's just super unclear, and nothing I'm trying is working.
The text was updated successfully, but these errors were encountered: