[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Threads in emacs implementation
From: |
Magnus Henoch |
Subject: |
Re: Threads in emacs implementation |
Date: |
Wed, 08 Jun 2005 23:43:24 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (berkeley-unix) |
Nic Ferrier <address@hidden> 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
- Re: Threads in emacs implementation, (continued)
- Re: Threads in emacs implementation, Ken Raeburn, 2005/06/07
- Re: Threads in emacs implementation, Magnus Henoch, 2005/06/08
- Re: Threads in emacs implementation,
Magnus Henoch <=
- Re: Threads in emacs implementation, Nic Ferrier, 2005/06/08
- hidden buffers for async (was Re: Threads in emacs implementation), Nic Ferrier, 2005/06/08
- Re: hidden buffers for async (was Re: Threads in emacs implementation), Miles Bader, 2005/06/08
- Re: hidden buffers for async (was Re: Threads in emacs implementation), Richard Stallman, 2005/06/09
- Re: hidden buffers for async, Nic Ferrier, 2005/06/09
- Re: hidden buffers for async, Luc Teirlinck, 2005/06/09
- Re: hidden buffers for async, Nic Ferrier, 2005/06/09
- Re: hidden buffers for async, Richard Stallman, 2005/06/10
- Re: hidden buffers for async, Nic Ferrier, 2005/06/11
- Re: hidden buffers for async, Henrik Enberg, 2005/06/11