Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 305 Bytes

readme.md

File metadata and controls

25 lines (19 loc) · 305 Bytes

co-routine library

example

void hello_world(void* arg) {
	printf("hello \n");
	yield;
	printf("world\n");
}

void main() {
	//setup
	fiber* f1 = new fiber();
	sc->attach(f1);

	//async execution
	func* f = f1->invoke(hello_world, NULL);
	f->wait();

	//scheduler mainloop
	sc->start();
}