It was developed in 2014 and has public domain licence.
The CPC version for BlackBox is http://www.zinnamturm.eu/downloadsAC.htm#Co_.
The cross-platform collection is http://sourceforge.net/projects/ta1/files/co2.0/. (co-v2.0-all.zip)
Basically, Co_ subsystem is implement in Oberon style and supports following platforms:
- BlackBox for Windows, which is based on Windows Fibers coroutines implementation
- BlackBox for Linux, based on unix contexts (makecontext, swapcontext)
- XDS for Windows, based on Modula2 COROUTINES
- XDS for Linux, based on Modula2 COROUTINES
- Ofront for Windows/Linux (not published)
It has no Kernel support yet, so pointers in coroutines are not examined by garbage collector.
Co_ subsystem supports 2 types of coroutines (classification taken from http://wiki.c2.com/?CoRoutine):
- 1.Anonymous coroutines - used by Scheduler for Cooperative Multitasking
- 2.Directed Coroutines - called as subroutines by stack discipline
Co_ package consists of following modules with comprehensive examples:
- Co_Tasks - Task for Cooperative Multitasking and base module for Co_Routines
- Co_Routines - Implementation itself
- Co_ScheadTasks - scheduler for Cooperative Multitasking
- ObxSameFringe - Same Fringe problem example (directed coroutine)
- ObxMJackson - Michael Jackson's methology for inverted programming - grep example (directed coroutine)
- ObxShakespeare - Othello play scheduler
- ObxAction - background task Co_Routines-based implementation
- ObxTActions - background task Tasks-based implementation
- ObxPhilosophers - Dining Philosophers multitasking problem with semaphores
- ObxProducerConsumer - Producers and Consumers multitasking
- ObxReadersWriters
In this branch I'll concern several issues about coroutines I met during the latter period.