lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Coroutines can be used standalonish? #231

Closed Globik closed 6 years ago

Globik commented 6 years ago

I'm wondering if lwan's coroutines can work standalone from lwan server? Let's say as a library? Can be compiled on his own or it's impossible without the lwan's whole stuff?

dakerfp commented 6 years ago

They can if you respect the license and make some minor changes. Their dependencies are ucontext, lwan's data structures and stdlib.

Globik commented 6 years ago

Hi @dakerfp I apreciate your answer. I'll try to compile a small programm using lwan lib. So far I'm just studying the C language. Just couriose about if I can bind the libuv instance with lwan's coroutines. Just because here there are real life practical use cases from lwan's source code I mean "coroutines".

sjnam commented 6 years ago

@Globik https://github.com/sjnam/lwan-coro

lpereira commented 6 years ago

Closing issue as the question has been answered. Feel free to reopen if that's not the case.

Globik commented 6 years ago

@sjnam thank you so much, it's wonderful. @lpereira thank you too, it's a nice job.

Globik commented 6 years ago

How to coroutinify callbacks??