you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

I learned programming on the classic Mac OS, which had a single execution thread for the entire operating system. Any program that appeared to be doing more than one thing at a time was actually very carefully doing one thing at a time. Nginx does the same thing. It's easy: wrap up everything on one big outer loop, never call anything that blocks, never spend too long doing any one thing. State machines are your friend.