Menu ▾ ▴

#9 Monkey patch for infinite RunCommand loop for large outputs

open
nobody
None
5
2011-01-26
2011-01-26
Kamran
No

For this bug:

https://sourceforge.net/tracker/?func=detail&aid=2569066&group_id=190927&atid=935323

I have put in a fail-safe for the affected loop in PipedInputStream.cs.

It's a hack, but it just makes sure the Monitor.Wait doesn't get stuck in an infinite loop by only looping to a maximum of 5 (customizable) loops. This seems to have worked fine for the outputs we've tested that have been very long (such as a grep for a common word in the filesystem).

Honestly, the way this thing component threading is a bit scary and is a carry over from the old days... we have better thread management in .NET nowadays and this Monitor.Pulse, Monitor.Wait needs to go away. I don't know enough to do this myself quickly, so this monkey patch is the best I could do in short time.

Discussion

  • Kamran

    Kamran - 2011-01-26

    Hacked PipedInputStream.cs file

     

Log in to post a comment.