]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/context/example/v1/fibonacci.cpp
2 // Copyright Oliver Kowalke 2014.
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)
11 #include <boost/context/all.hpp>
15 boost::context::execution_context
sink( boost::context::execution_context::current() );
16 boost::context::execution_context
source(
17 [n
,&sink
](void*)mutable{
27 for(int i
=0;i
<10;++i
){
28 std::cout
<<*(int*)source()<<" ";
30 std::cout
<< "\nmain: done" << std::endl
;