A simple, lightweight multi-task system (coroutines) for Linux
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
bin
build
include
src
.clang-format
Android.mk
Application.mk
Makefile
README.md
build.mk
configs.mk

README.md

HevTaskSystem

HevTaskSystem is a simple, lightweight multi-task system (coroutines) for Linux.

The task system is executed by a Linux process/thread. In task system, you can creates many tasks and attachs to task system. When a task yield or blocked by I/O, the scheduler will pick a suitable task from running list and switch to. The memory space, file descriptors and other resources are shared for all tasks in task system. Every task has a private, standalone task structure (#HevTask) and stack in heap of the process.

In task, you can allocate memory from heap, read and write data from to stack, and do I/O operations in synchronized mode.

How to Build

Linux:

git clone https://gitlab.com/hev/hev-task-system
cd hev-task-system
make

Android:

mkdir hev-task-system
cd hev-task-system
git clone https://gitlab.com/hev/hev-task-system jni
ndk-build

Demos

  1. simple
  2. timeout
  3. wakeup
  4. echo-server
  5. gtk
  6. curl

Authors

License

LGPL