Stem should optionally timeout when building circuits
I recently found out that CircuitBuildTimeout 10\nLearnCircuitBuildTimeout 0
doesn't always make your circuit build attempts timeout after 10 seconds. In an attemp to avoid repeating myself, I think the commit message0 has a good summary of why.
I would find it immensely useful if stem could optionally take a timeout on its new_circuit
function that would raise an exception when the timeout is hit. For completeness, I imagine new_circuit
's sibling functions like extend_circuit
should probably also take a timeout.
For the time being, I've implemented a work around in sbws. I am providing the commit that makes the change in case it would be helpful for doing something similar in stem. I think it's messy, gross, and probably needlessly complicated. Do with it what you will :) I hope someday soon I can burn it with fire.