Project

General

Profile

Actions

Support #7710

open

Continuations and WResource lifespan

Added by Velvet Jones about 4 years ago. Updated about 4 years ago.

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;

}

Actions #1

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

Also available in: Atom PDF