Skip to content

gummoni/SimpleFiber

Repository files navigation

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();
}

About

C言語でコルーチンを実装

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages