Wednesday, October 05, 2016

Doing Homework

I've been digesting David Beazley videos this morning, among others, once again tackling the topic of asynchronous multi-tasking in the Python computer language, by means of coroutines.

Coroutines are a new type of object in Python, a "subtype" of generator in that they use much of the same implementation code as generators.

However they're a whole different animal, are not a subclass in the Pythonic sense.  What coroutines do is surrender control back to the awaiting caller.

Coroutines ratchet forward as driven by some whip-cracking task master, cranking forward a notch at a time, perhaps awaiting on other coroutines internally.

Getting a lot of coroutines notching forward "at once" (each inching forward, then surrendering control) is what gives us the multi-tasking flavor, but it's all happening in the one thread.

The trick is knowing when to gracefully say "not ready yet" in a non-blocking manner.  Don't make the waiter stand there while you consider your order.  Let the waiter cycle back again in a few minutes (milliseconds or less).


Tuesday came off without a hitch except Carol left her favorite bright green water bottle at Providence.

Carol chatted with Wanderers about the obsolescence of outward wars.  That doesn't mean all the engineers engaged in "destructive engineering" (aka "anti-civil engineering") have retired yet of course.

Uncle Bill actually used to be a maintenance engineer for the DEW line radomes; I hadn't known that.

Uncle Bill