Skip to content

When attaching a continuation to boost::future, the continuation is executed in a new thread(default), which will cause memory usage problem #156

@fengzhuye

Description

@fengzhuye

In the example callee.cpp: one should not use it this

provide_future_add = session->provide("com.examples.calculator.add2", &add2).then(
                        [&](boost::future<autobahn::wamp_registration> registration) {
                       ...
                    });

but like this:

provide_future_add = session->provide("com.examples.calculator.add2", &add2).then(
                        boost::launch::deferred,
                        [&](boost::future<autobahn::wamp_registration> registration) {
                       ...
                    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions