All Projects → heiher → hev-task-system

heiher / hev-task-system

Licence: MIT license
A simple, lightweight multi-task system (coroutines) for Unix (Linux/BSD/macOS)

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects
Makefile
30231 projects

Projects that are alternatives of or similar to hev-task-system

Libfiber
The high performance coroutine library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iocp/windows GUI
Stars: ✭ 519 (+1165.85%)
Mutual labels:  epoll, coroutine
xm2cloud term
powerful webssh that developed with django, channels, xterm,ioloop
Stars: ✭ 17 (-58.54%)
Mutual labels:  kqueue, epoll
Mgx
🌈 A high performance network framework written in c++ (support tcp and http)
Stars: ✭ 15 (-63.41%)
Mutual labels:  epoll, coroutine
ev
Lightweight event-loop library based on multiplexing IO
Stars: ✭ 15 (-63.41%)
Mutual labels:  kqueue, epoll
Nuclei
Proactive IO & Runtime system
Stars: ✭ 113 (+175.61%)
Mutual labels:  io, epoll
netpoll
Package netpoll implements a network poller based on epoll/kqueue.
Stars: ✭ 38 (-7.32%)
Mutual labels:  kqueue, epoll
libapenetwork
Fast cross-platform async network library
Stars: ✭ 17 (-58.54%)
Mutual labels:  kqueue, epoll
Gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go./ gnet 是一个高性能、轻量级、非阻塞的事件驱动 Go 网络框架。
Stars: ✭ 5,736 (+13890.24%)
Mutual labels:  kqueue, epoll
toyhttpd
I/O 模型练手代码,分别使用阻塞式 I/O、select、poll 和 epoll 和 Java NIO 实现了简单的 HTTP Server
Stars: ✭ 43 (+4.88%)
Mutual labels:  io, epoll
fastsocket
⚠️⚠️⚠️ DEPRECATED
Stars: ✭ 14 (-65.85%)
Mutual labels:  kqueue, epoll
async
⏱ Promises and reactive-streams in Swift built for high-performance and scalability.
Stars: ✭ 35 (-14.63%)
Mutual labels:  kqueue, epoll
airyx
A BSD-based OS project that aims to provide an experience like and some compatibility with macOS (formerly known as airyxOS)
Stars: ✭ 2,490 (+5973.17%)
Mutual labels:  freebsd
UKFileWatcher
A bunch of classes for detecting changes of files and folders. Extracted from UliKit. Home of UKKQueue.
Stars: ✭ 15 (-63.41%)
Mutual labels:  kqueue
nj
NJ is a simple script engine in golang with Lua-like syntax.
Stars: ✭ 19 (-53.66%)
Mutual labels:  coroutine
libcorpc
Libcorpc is a high performance coroutine base RPC framework
Stars: ✭ 20 (-51.22%)
Mutual labels:  coroutine
ZRouter
No description or website provided.
Stars: ✭ 16 (-60.98%)
Mutual labels:  freebsd
zhamao-framework
协程、高性能、灵活的聊天机器人 & Web 开发框架(炸毛框架)
Stars: ✭ 99 (+141.46%)
Mutual labels:  coroutine
echo-server
Echo Server is a Docker-ready, multi-scalable Node.js application used to host your own Socket.IO server for Laravel Broadcasting.
Stars: ✭ 32 (-21.95%)
Mutual labels:  io
ProtoPromise
Robust and efficient library for management of asynchronous operations in C#/.Net.
Stars: ✭ 20 (-51.22%)
Mutual labels:  coroutine
minecraft-protocol
Library for decoding and encoding Minecraft packets
Stars: ✭ 20 (-51.22%)
Mutual labels:  io

HevTaskSystem

status

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

The task system is executed by a Unix 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.

Features

  • Simple/lightweight task.
  • I/O operations wrapper.
  • Inter-task synchronous. (Mutex/Condition)
  • Inter-task communications. (Channel)
  • Slice-based memory allocator.
  • Call on new stack.
  • Multi-thread support.
  • Multi-platform support. (Linux/BSD/macOS)

How to Build

Unix:

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

# Link with librt (only for glibc versions before 2.17)
make LDFLAGS=-lrt

# Disable multi-thread support
make ENABLE_PTHREAD=0

# Disable stack overflow detection
make ENABLE_STACK_OVERFLOW_DETECTION=0

# Set stack backend to heap (Recommended for 32-bit)
make CONFIG_STACK_BACKEND=STACK_HEAP

# Disable sliced memory allocator
make ENABLE_MEMALLOC_SLICE=0

# Disable I/O splice by splice syscall (for old Linux kernel)
make ENABLE_IO_SPLICE_SYSCALL=0

# Demos
make apps

# Tests
make tests

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. channel
  3. timeout
  4. wakeup
  5. echo-server
  6. call
  7. gtk
  8. curl

Contributors

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].