ebarlas / microhttp

Fast, scalable, self-contained, single-threaded Java web server
MIT License
539 stars 54 forks source link

Add simple concurrency to Microhttp #13

Closed ebarlas closed 2 years ago

ebarlas commented 2 years ago

Split event loop into (1) single passive-server-socket event loop and (2) many active-socket events loops.

Each event loop is single-threaded and independent. Still no locking or synchronization.

This design is facilitated by Selector, which permits select on one thread and register on another.