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();
}
-
Notifications
You must be signed in to change notification settings - Fork 0
C言語でコルーチンを実装
License
gummoni/SimpleFiber
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