Repository navigation
Differentiate async authentication - #67
JacobHenner wants to merge 1 commit into
Conversation
Differentiate async auth, to ensure that any blocking IO performed during GSSAPI authentication (e.g. network interactions with a KDC) does not block the event loop.
|
@JacobHenner Thanks for addressing this. I'm playing with some variations locally to see how much we can avoid bifurcating the response handling to avoid any risk of it diverging in future refactors. I have a nested generator implementation where the thread targets are yielded alongside the requests, but MyPy really hates it lol, so I'm going to try again. |
|
@JacobHenner I've sent you two different options for refactors the avoid duplicating the response handling. The first moves the auth flow generator to a background thread and uses two queues to get requests and put responses. The second pushes each step of the flow generator onto a thread. |
Do you have a preference between the two? I think I prefer the second. |
I also prefer the second. At first I was concerned about potentially bouncing between executor threads, hence the first PR, but your current implementation would have the same effect, so I don't think it's a problem. We can always revisit this if necessary. |
Differentiate async auth, to ensure that any blocking IO performed during GSSAPI authentication (e.g. network interactions with a KDC) does not block the event loop.