diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-01-22 23:57:42 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-01-22 23:57:42 +0000 |
commit | 6ad21dfbb88b008526fd7441210df5534eb452ea (patch) | |
tree | ece56e7184490ff0b8feff4fbed3cd8185649ff4 /ide/ideutils.mli | |
parent | f6dd0d9ef10fe8d9b742001fef6f68f06ac05218 (diff) |
Coqide: avoid potentially blocking read on coqtop channel
With Pierre-Marie, we discovered the hard way that Glib.Io reads
are *not* non-blocking by default as I thought. My bad...
This was causing nasty freezes of coqide in the rare cases where
the final read was exactly filling the buffer (which was of size 1024).
Now:
- the input channels from coqtop (and various other external commands)
are given to Unix.set_nonblock
- Exceptions in our io_read_all (typically a kind of EAGAIN) terminate
the read
- We can now switch to Glib.Io.read_chars instead of the deprecated
Glib.Io.read.
- Btw, we use a larger buffer (8192).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16138 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/ideutils.mli')
-rw-r--r-- | ide/ideutils.mli | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ide/ideutils.mli b/ide/ideutils.mli index 87ddb2a95..cc34a355a 100644 --- a/ide/ideutils.mli +++ b/ide/ideutils.mli @@ -80,7 +80,8 @@ val stat : string -> stats val read_file : string -> Buffer.t -> unit -(** Read the available content on some gtk asynchronous input channel *) +(** Read what is available on a gtk input channel. + This channel should have been set as non-blocking. *) val io_read_all : Glib.Io.channel -> string |