So to summarize:
1. In the controller that needs to initiate the background task, we should do the following before rendering the view:
response.headers["!~Request-OOB-Work"] = "true"
2. I must initiate my background task in the callback for an oob_work event.
Q1. Does the oob_work callback run in its own thread? Can I spawn a thread in the callback and do my actual processing in that thread?
Q2. The specific task I need to run would only be known in the controller that processes my request, not in the application initializer. Can I call on_event inside a controller, or do I have to always call it in the application initialization code - in which case its value is diminished.
Regards.