Stefan Monnier <monn...@iro.umontreal.ca> 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.

_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to