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();
}
gummoni/SimpleFiber
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
C言語でコルーチンを実装
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published