I want to overlap web server processing with some background tasks responsible for maintaining the data that the server displays. How do I do it ? The server’s main loop (http_handler()) is a blocking call that doesn’t seem to permit any background task.
I tried putting the bulk of http server’s main loop inside a ‘slice()’ call so the background processing could pre-empt it but the compiler tells me dcrtcp and slice calls cannot be used in the same program.
Is my only option to hack the internals of http_handler() so its idle time can be used for background processing ?
thanks in advance for any help.