How to execute request-specific tasks after page response is returned. Does hook_exit() actaully do this?
You're looking for fastcgi_finish_request(). Recommend using it inside of a shutdown function. If you need something else the HTTPRL module should be able to do what you need with threading.