Repository navigation
v0.0.51 C08 sending work to another interpreter
C08, the last of the eight concurrency lessons, and the practical half of C04.
C04 built a second interpreter and found that the two share almost nothing. C08 asks what follows from that: how do you give one of them a job, and what does the handover cost. Which callables can cross and why a recursive function cannot, the three route fallback chain that an argument goes through, what comes back when the far side raises, which standard library modules refuse to load in a subinterpreter at all, how many queue round trips a second you can afford, and InterpreterPoolExecutor.
Two Tier 1 recordings split the same two workloads three ways on both builds. On a build with the lock, four interpreters take the arithmetic job from 507 ms to 208 ms while four threads do nothing. On a build without the lock the ranking flips and threads win at 179 ms against 359 ms. The job whose argument is a two hundred thousand item list is ruined on both, 6 ms one at a time against 255 ms across four interpreters, because there the crossing is the whole job. The verdict is not a ranking, it is a question about the shape of your work.
Also in this release: a correction to C07's closing paragraph, which described C04's material rather than C08's.
Three glossary terms, six diagrams and twelve citations. Both READMEs updated. GLOSSARY.md is now 213 terms and CLAIMS.md is 557 claims across 71 lessons.