Uh oh!
There was an error while loading. Please reload this page.
Global queue - #28
Conversation
WyriHaximus
commented
May 5, 2015
Shiny! I'll run some tests against it tonight 👍 |
jsor
commented
May 5, 2015
Great! I've already successfully run the test suites of react/filesystem, react/react, guzzle and recoil against this branch. But more tests are appreciated! |
WyriHaximus
commented
May 5, 2015
Awesome! Going to run test against a specific function's early dev version of https://github.com/WyriHaximus/TickingPromise that was causing segfaults |
WyriHaximus
commented
May 5, 2015
Right just had the time to run some tests against it. First off the initial version of The other thing I've noticed that running https://github.com/WyriHaximus/TickingPromise/blob/master/examples/ticking_future.php on the latest tag runs for +/- 24 - 28 seconds while with this PR it runs at 30 seconds solid. Not sure if that is my laptop messing things up maybe you can give it a swirl? Also not that that file is doing 307.200 checks before resolving the promise 😉 . |
jsor
commented
May 5, 2015
Not sure what you're seeing as the "problem" here. That it's slower with the queue (yes, it is slightly slower) or that the time is not longer varying? |
WyriHaximus
commented
May 5, 2015
via email
Just presenting my findings as is. Should have clarified that I don't see
them both as a problem. Especially giving the high iteration count. |
jsor
commented
Sep 7, 2015
WyriHaximus
commented
Sep 9, 2015
LGTM 👍 |
This reverts commit cc6f1c3. Note: The task must be kept on the queue until after it is called. Otherwise drain() will be called recursively.
cboden
commented
Oct 8, 2015
Looks good to me. I'm not sure if my issue belongs here but where would |
WyriHaximus
commented
Oct 8, 2015
@cboden |
cboden
commented
Oct 8, 2015
What about PromiseTimer...sort of fits the bill...at least requires both as deps. |
WyriHaximus
commented
Oct 8, 2015
Could work, but quickly judging by that package it is focused on promises and timers, not promises queues. Would look out of place imho. |
jsor
commented
Oct 8, 2015
I don't think it fits into reactphp/promise-timer. If anything, this could become a standalone package as @WyriHaximus suggested. |
jsor
commented
Jan 21, 2016
I'm planning to add this to 3.0. |
This PR introduces a global task queue to eliminate the problem of deep recursion as discussed in #22.
As noted in this issue, this also opens the possibility to implement future-turn resolutions (#4) through a event loop based queue implementation (example: https://gist.github.com/jsor/52bde3f82014e3898758 for a React\EventLoop based implementation).
Closes#22