Comment by pjmlp
You are expecting them to actually check the value, there is nothing preemptive.
Another approach is special messages over a side channel.
You are expecting them to actually check the value, there is nothing preemptive.
Another approach is special messages over a side channel.
You can take that view, yes.
But if you store your context in a struct (which is not the recommend “best practice” – but which you can do) it's no longer a function coloring issue.
I do that in on of my libraries and I feel that it's the right call (for that library).
So instead of a context you need to pass a a channel. Same problem.