Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue a bunch of requests; continue code execution where the stream_select event loop gets called every so often doing I/O while other things are going on. Set the ticks variable to something like 1000. Start the request in hook_init; I/O happens throughout the code; pickup the finished requests in hook_exit.
http://php.net/register-tick-function
Comment | File | Size | Author |
---|---|---|---|
#4 | httprl-1530636-4-fix-php-notice.patch | 548 bytes | mikeytown2 |
#3 | httprl-1530636-3-stall-fread.patch | 5.62 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedSomething to consider in a 2.x release if I have one.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedWhile interesting, going to change the subject into something more tangible. Launching processes is a better option for most things.
The only thing I find this useful for would be ESI emulation. A better way to do this is to exit the event loop once all fwrite()'s have been done and pick it back up later on in the request to do the fread()'s.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThe following patch has been committed to 6.x & 7.x.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedFixed php notice. Patch has been committed to 6.x & 7.x