in reply to Re^2: Module callbacks - to fork or not fork
in thread Module callbacks - to fork or not fork
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Module callbacks - to fork or not fork
by hippo (Archbishop) on Mar 02, 2023 at 23:15 UTC |