Closed lordmauve closed 7 years ago
Using loop.stop() to pass a result back to the calling thread can result in losing sync if the loop has previously crashed somehow.
loop.stop()
I was able to get the following code:
print('num_users', tun.call(num_users)) print('getpass', tun.call(getpass.getuser))
to produce this output:
shadow_users root getpass 40
This can be fixed by clearing the Tunnel's callbacks if the loop crashes. However, better would be to actually tie back the request ID to the response being waited for, and only terminate the loop if it matches.
This was fixed over the last couple of commits.
Using
loop.stop()
to pass a result back to the calling thread can result in losing sync if the loop has previously crashed somehow.I was able to get the following code:
to produce this output:
This can be fixed by clearing the Tunnel's callbacks if the loop crashes. However, better would be to actually tie back the request ID to the response being waited for, and only terminate the loop if it matches.