ipykernel
ipykernel copied to clipboard
fix mixture of sync/async sockets in IOPubThread
all sockets are explicitly sync until/except we are in the coroutines that will await them, whereas there was an ambiguous mixture of sync and async sockets before
- consistent behavior of send for child pipe and main process sockets
- avoids unsafe assumption that send is greedy on async sockets
- avoids potential issues creating async objects in one thread, then using them in another in a different event loop
- always creates/uses the right types, regardless of input socket
- address some typing lint
found while working on https://github.com/ipython/ipyparallel/issues/895
ok, actually all correct now, I think