]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/context/example/jump.cpp
2 // Copyright Oliver Kowalke 2016.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
10 #include <boost/context/continuation.hpp>
12 namespace ctx
= boost::context
;
18 [&data
](ctx::continuation
&& c
){
19 std::cout
<< "entered first time: " << data
<< std::endl
;
22 std::cout
<< "entered second time: " << data
<< std::endl
;
25 std::cout
<< "returned first time: " << data
<< std::endl
;
29 std::cout
<< "returned second time: " << data
<< std::endl
;
31 std::cout
<< "returned second time: execution context terminated" << std::endl
;
33 std::cout
<< "main: done" << std::endl
;