That is a much more useful example program, thank you.<p>The problem is that the &quot;canonical example&quot; pretty much remains what I showed. And what&#x27;s bad about that example isn&#x27;t simple length but the way that the creation and manipulation of kernels and threads remains entirely opaque (in contrast to your example I think).