You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runtime version query API: coco_version(), coco_version_major(), coco_version_minor(), coco_version_patch().
ENSURE_IN_CORO / ENSURE_IN_CORO_RET / ENSURE_IN_CORO_VOID guard macros for coroutine-only APIs, preventing crashes when called outside a coroutine context.
POSIX signal block/unblock (coco_preempt_block_signal() / coco_preempt_unblock_signal()) with reference-counted nesting counter for critical section protection.
P binding detection for coco_go(): when called from a worker thread, the new coroutine binds to the current P instead of scanning all processors.
Periodic load balancing integrated into the worker loop (triggered every 100 coroutines processed).
Linux netpoller wakeup uses eventfd instead of pipe for lower overhead.
New examples: hot_stack, dynamic_stack, context_api.
New benchmarks: bench_mt_sched, bench_hot_cold_switch; bench_io rewritten to measure actual coroutine I/O throughput.
Doxygen configuration for API reference generation.
GitHub Actions CI workflow with sanitizer matrix (ASan, UBSan).
Automated release workflow triggered on version tag push.
Changed
coco_yield() return type changed from void to int (returns COCO_ERROR_INVALID when called outside a coroutine). ABI note: existing compiled objects must be recompiled.
coro->state type changed from int (non-atomic) to _Atomic int for thread-safety. ABI note: existing compiled objects must be recompiled.
Global runq wake strategy: targeted pthread_cond_signal replaces broadcast to fix thundering herd.
Fixed
Multi-threaded scheduler data races and leaks:
coro->state is now _Atomic (acquire/release ordering).
stack_pool_multi protected by per-pool mutex.
Wrong-pool-free on work-stealing fixed via coro->stack_pool tracking.
Channel wait_queue_lock and scheduler global_runq_lock / local_runq_lock critical sections protected from preemption.
Scheduler reinitialization: coco_global_sched_stop() now fully cleans up state (queues, counters, locks).
schedule_balanced() now actually redistributes coroutines from overloaded P's and releases hot-stack slots before migration.