help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: howto: 2 users interactively edit the same file ?


From: Tim X
Subject: Re: howto: 2 users interactively edit the same file ?
Date: 03 Nov 2005 17:25:54 +1100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Eli Zaretskii <eliz@gnu.org> writes:

> > From: Tim X <timx@spamto.devnul.com>
> > Date: 31 Oct 2005 19:04:16 +1100
> > 
> > I find it amazing this will work. The big problem is how can emacs,
> > which doesn't support threads, handle simultaneous input from two
> > distinct frames? I can't see how it can handle input from two
> > different input devices simultaneously either.
> 
> I don't see why you cannot see that: quite simply, Emacs tries to read
> from every possible input source, one after the other (that includes
> any subprocesses that happen to run in some Emacs buffers, such as
> compilation, Grep, spell-checker, etc.).  Emacs uses the system call
> `select' or its equivalent to do that; `select' actually allows you to
> set up a kind of ``poor man's threading'' in a single thread.
> 
> > The physical displaying
> > of the frame on another display is easy enough to understand - this is
> > a feature of X windows which emacs is able to take advantage of when
> > it is built with X lib support - but coping with input from two
> > sources at the same time is a very different matter. 
> 
> Not really.  Provided that you know what source each input even came
> from, it's quite easy to DTRT with each one of them.

OK, I'm quite willing to accept all of that, though I'd still have
concerns about how performance would be. If I understand you
corrrectly, wouldn't there be a high likelihood of one input source
"hogging" things - effectively causing a sort of starvation for the
other user? There doesn't seem to be any sense of "fair" access in the
model your describing and I still feel this would be problematic.

I also wonder how emacs will handle things like local variables when
you have two different users editing in the same buffer. Wouldn't this
have consequences for things like point and region related commands?

I guess I'm over stating the complexities or something as the weight
of opinion is against me. I have no problem with that, but my past
experiences working on systems which have a similar model of operation
where two users are affecting the same resource concurrently tells me
its not as simple as just opening a second window on another display
and everything else will just sort of magically work - I guess its my
gut telling me there is a lot more too it and its a lot more complex -
no real specific proof of this though.

Tim


-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!


reply via email to

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