by tidwall on 4/8/24, 5:37 PM with 36 comments
by dkjaudyeqooe on 4/9/24, 10:53 PM
Stackful coroutines create a new stack for each coroutine thread and save and restore the appropriate registers when switching. Stackless coroutines are basically normal C functions that have been hacked to save their local variables between calls and use gotos (or, notoriously, a switch statement) to resume from where they last yielded. Both are very useful in their own way.
This is a great project and I'll be trying it out in my current work.
by plagiat0r on 4/8/24, 6:15 PM
I was going to actually implement an echo server for load balancer health checks with minimal memory usage, but never considered doing it in C but I might just use it! Thank you so much.
by keepamovin on 4/8/24, 5:55 PM
by andrekandre on 4/9/24, 11:30 PM
> neco_chan *messages = argv[0];
neco_chan → neko chan → kitty cat (in japanese)... coincidence? ^_^by dingdingdang on 4/9/24, 9:00 PM
by jonhohle on 4/10/24, 1:30 AM
Any notes about why I would try Neco in the future?
by anfilt on 4/10/24, 9:52 AM
by nialv7 on 4/9/24, 11:55 PM
I feel the word "coroutine" is slowly losing its original meaning, similar to what happened to "lambda".
by comex on 4/10/24, 3:58 AM
by Karellen on 4/10/24, 8:45 AM
by burntcaramel on 4/9/24, 11:24 PM
while (1) {
neco_sleep(NECO_SECOND*2);
printf("tock\n");
}