performing IO reads in a separate threads to avoid potentially blocking on Windows #765

wants to merge 1 commit into


None yet

2 participants


issue #755/#664


Hm, I've thought of doing this but I'm not sure if it is necessary. I think the problem really lies right here:

After staring at that method for about 5 minutes, I think I see what is going wrong on Windows. Specifically readpartial blocks only if there is no data in the buffer, whereas on linux read_nonblock never blocks, and raises an exception to break out.

I think the solution might just be to ALWAYS break after reading on Windows. This makes Windows slightly less performant but at least it won't hang. I'm going to keep looking though...


So I believe this commit actually fixes this in a very simple way: a90f33d

I've tested it and Windows still works for me, but I never saw the blocking behavior. Can you see if it fixes it?

@mitchellh mitchellh closed this Feb 28, 2012

Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment