just send your 200 first and then work through the callbacks
Why didn't I think of that???
I guess I'm conditioned to doing the logic first, then the output...
I've not tested it, but could there be a danger that the 200 and its payload will get buffered and will end up waiting after the callbacks complete? I have written code before that outputs HTML to a browser and then does other time-consuming stuff. But the HTML gets stuck in a buffer and I see a 408 timeout error instead of the HTML.
In reply to Re^3: Module callbacks - to fork or not fork
by Bod
in thread Module callbacks - to fork or not fork
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |