Re: Desktop::Editor again



On Tue, Sep 21, 1999 at 07:21:08PM +0200, Martijn van Beers wrote:

> New version after comments. There's one problem with this
> one, but I'm not sure how to fix that. Several processes
> can get the same EditorView object. This means the cursor
> position/selection could change between calls from one
> component. I'm really no locking expert, so please
> give me some hints :)

I presume that you can get some sort of unique id for the originator of a
CORBA message? In which case, lock_view(), unlock_view() should be
sufficient - possibly with lock_view() returning a unique id which is passed
back to unlock_view() (to allow multiple threads of a single application to
access the same EditorView without concurrency problems).

You'd need another exception "you can't do that - it's locked by someone
else!", of course.

Sounds simple. Am I missing something obvious? (Implementation-wise it might
be nasty if the Editor application could end up being called in different
threads, but I don't think that you can get into that situation unless it's
deliberate ...)

> 		 * found string. The search-string can optionally be a
> 		 * regular expression (Editors do not have to support this)

... in which case, shouldn't it throw an exception if someone tries to do
this?

James

-- 
/--------------------------------------------------------------------------\
  James Aylett                                           www.zap.uk.eu.org
  james@tartarus.org                                    www.footlights.org



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