Lets say that you have two greenlets A
and B
.
1) Inside B
you call A.kill(block=True)
. Immediatly after that context switch happens, Python jumps to A
and it raises an exception in A
. A
may handle it or not, it may jump somewhere else, timeout may occure on kill, etc.
2) Inside B
you call A.kill(block=False)
. Context switch does not happen. B
continues to run other commands after kill. Kill command is scheduled to fire though, i.e. as soon as Python jumps to A
it will raise the exception.
So AFAIK "block" simply means "do the switch now".