Currently, everything loops when there is an EAGAIN - but perhaps this is wrong, perhaps I should be writing async functions that suspend on these conditions, and resume later. This would be so the sshQueue work does not get clogged with potentially blocking operations (say, transferring a file)
I would also likely need to change class Session to actor Session and likely have to fold the various session implementations into a single class. Or have a SessionActor instance purely to call the methods in libssh2 for the session and their channels.
Currently, everything loops when there is an EAGAIN - but perhaps this is wrong, perhaps I should be writing async functions that suspend on these conditions, and resume later. This would be so the sshQueue work does not get clogged with potentially blocking operations (say, transferring a file)
If we were to use async as described here:
https://forums.swift.org/t/async-design-challenge/55052/7
I would also likely need to change
class Session
toactor Session
and likely have to fold the various session implementations into a single class. Or have a SessionActor instance purely to call the methods in libssh2 for the session and their channels.