Jim@programming.dev to Python@programming.devEnglish · 1 year agoCLI tools hidden in the Python standard librarytil.simonwillison.netexternal-linkmessage-square1fedilinkarrow-up12arrow-down10 cross-posted to: python@programming.devpython_dev@lemmy.pastwind.toppython@partizle.com
arrow-up12arrow-down1external-linkCLI tools hidden in the Python standard librarytil.simonwillison.netJim@programming.dev to Python@programming.devEnglish · 1 year agomessage-square1fedilink cross-posted to: python@programming.devpython_dev@lemmy.pastwind.toppython@partizle.com
minus-squareo11c@programming.devlinkfedilinkEnglisharrow-up1·edit-21 year agoIt’s worth noting that the http.server module is based on socketserver.BaseServer.serve_forever, which is a atrocious. It uses a busy loop with a delay, so it both burns CPU and is unresponsive. (The fact that Python has had broken signal handling since 3.5 also hurts - EINTR should never be ignored from blocking calls)
It’s worth noting that the
http.server
module is based onsocketserver.BaseServer.serve_forever
, which is a atrocious.It uses a busy loop with a delay, so it both burns CPU and is unresponsive.
(The fact that Python has had broken signal handling since 3.5 also hurts - EINTR should never be ignored from blocking calls)