Skip to content

2qif49lt/xhb11lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

xhb11lib

c++14 future-then-routine

g++ test_utils.cpp ../src/resource.cpp ../src/resource_linux.cpp ../src/thread.cpp ../src/posix.cpp ../src/smp.cpp ../src/reactor.cpp future_test.cpp -O2 -o main -std=c++14  -I../src -lpthread
#include <iostream>
#include <string>
#include <type_traits>
#include <functional>
using namespace std;

#include "test_utils.h"

#include <thread.h>
#include <reactor.h>
#include <future.h>

TEST_CASE(futuret) {
    namespace xt = xhb::thread_impl;

    xhb::engine_start(argc, argv, []{ 
        cout << "hello world" << endl; 
        xhb::make_ready_future<>().then([]{
            cout << 123 << endl;
        }); 
    });
    return 0;
}

About

c++14 个人框架 future-then-routine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published