Leaving Your Sock(et)s Hanging

1 · Srijan R Shetty · July 21, 2020, 7:42 a.m.
A command pattern that I’ve used in multiple projects is an event-loop sidecar. The sidecar runs on it’s own thread and does asynchronous IO; thereby increasing the responsiveness of the system which could be doing IO/CPU bound work. The application (running on the main thread) interfaces with the sidecar through a synchronous API. There are multiple caveats to this pattern. With python’s GIL, the sidecar should strictly be doing I/O to ensure that the pattern has the desired effects. If you hav...