An open API service indexing awesome lists of open source software.

https://github.com/kezhengjie/coroutinetool

functional c++ tiny lib based on c++20 coroutine,for learning and utility purpose.
https://github.com/kezhengjie/coroutinetool

async-executor coroutine cpp cpp-coroutines cpp20 cpp20-library fluent modern shell-command shell-executor system-commands

Last synced: 3 months ago
JSON representation

functional c++ tiny lib based on c++20 coroutine,for learning and utility purpose.

Awesome Lists containing this project

README

        

# coroutinetool
functional c++ tiny lib based on c++20 coroutine,for learning and utility purpose.

currently a async shell executor implemented.You could run system command in place with calling `fgets` etc...

## Start

```c++
#include "async_shell_executor.h"
#include

using namespace std;
using namespace coroutinetool;

int main(int argc, char **argv)
{
auto ae = AsyncExecutor::Run("ipconfig");
while (ae)
cout << ae();
cout << "return code is: " << ae.Code() << endl;
ae = AsyncExecutor::Run("ipconfig");
while (ae)
cout << ae();
cout << "return code is: " << ae.Code() << endl;
}
```