all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* process_send_string blocks?
@ 2014-09-06  8:09 Stephen Leake
  2014-09-06  8:28 ` Jorgen Schaefer
  2014-09-06  9:34 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Leake @ 2014-09-06  8:09 UTC (permalink / raw)
  To: emacs-devel

I'm trying to use a background process to parse buffer text, and send
results back to Emacs.

For large buffers, Emacs hangs; only killing the background process
externally recovers. This does not happen for small buffers (< 5k bytes?).

It appears that process-send-string is blocked on a full IO send queue,
while the background process is also blocked on a full IO send queue.

On reading process.c, I believe this should not happen, if the OS supports
EWOULDBLOCK. 

Is that true, even when there is only one call to process-send-string that
sends the entire buffer?

The doc string for process-send-string says "if > 500 chars, string is
sent in bunches", but I see no evidence of that in process.c. Is that
refering to the OS IO queue buffer size?

I'm running on Windows 7, using the Windows binary
emacs-23.4-bin-i386.zip from the FSF FTP site.

Is EWOULDBLOCK supported on this system?

I'll try compiling Emacs from source so I can run the debugger; I've
never tried that on Windows before.

I'd hate to have to code the partial read/partial write logic at the
elisp level.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-07 20:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-06  8:09 process_send_string blocks? Stephen Leake
2014-09-06  8:28 ` Jorgen Schaefer
2014-09-06  9:34 ` Eli Zaretskii
2014-09-06 13:11   ` Stephen Leake
2014-09-06 13:28     ` Eli Zaretskii
2014-09-07  8:21       ` Stephen Leake
2014-09-07 15:44         ` Eli Zaretskii
2014-09-07 20:32           ` Stephen Leake

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.