Actions
Support #7710
openContinuations and WResource lifespan
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/09/2020
Due date:
% Done:
0%
Estimated time:
Description
Is the pseudo-code below acceptable concerning the lifespan of the WFileResource member in the event that the WFileResource uses continuations? Specifically wondering what happens here when I return from handleRequest.
class MyClass : public Wt::WResource
{
void handleRequest(request,response)
{
m_fr.setFileName(blah);
m_fr.setMimeType(blah)
m_fr.handleRequest(request,response);
return;
}
Wt::WFileResource m_fr;
}
Updated by Roel Standaert about 4 years ago
The beingDeleted()
which is called in the destructor of a resource will cancel all remaining continuations. Any continuation will be aborted.
Actions