[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous insertion / saving of buffers

From: Michael Albinus
Subject: Re: Asynchronous insertion / saving of buffers
Date: Sun, 22 Apr 2012 20:27:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I don't think we'd have any locking, instead you'd have to be careful
> not to touch the buffer until insert-file-contents is over.
> But you could add a `busy' buffer-local variable and use it as a lock if
> you feel like it.

Likely, the buffer shall be read-only while the other thread runs. And
maybe we shall add a more instructive warning when somebody tries to
modify the buffer that time. All this could be wrapped by something
like insert-file-contents-asynchronically.

> Also to inform other code that insert-file-contents is done, you can
> simply use a `done' variable which you set to t when it's done, so the
> other code can check when it's over.  But a more likely way to work is
> to put the "things to do when the insert-file-contents is done" in the
> second "..." of my sample code.

I see.

Well, you're right, this makes more sense than extending a file name
handler for insert-file-contents. Thanks.

>         Stefan

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]