Nic Ferrier <[EMAIL PROTECTED]> writes:
> We don't need threads in elisp. Just more asynchronous network
> implementations.
Good point.
What is the best way to send a large amount of data to a network
connection in the background? You could send a chunk at a time with
process-send-string and then recurse with run-with-idle-timer, but it
seems that this will either block the UI or cause unnecessarily slow
transfer unless the chunk size and the delay are right.
> Anyway, async code is so much more fun to write than threaded
> code. Threads are for beginners.
Can you elaborate? I don't see how
(defun foo-1 ()
(send-request-with-callback 'foo-2))
(defun foo-2 (response)
(do-something response))
is more fun to write than:
(defun foo ()
(let ((response (send-request-and-get-response)))
(do-something response)))
Magnus
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel