Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] locking mechanism


----- Ursprungligt meddelande -----
> Från: "Stefan Lay" <stefan.lay@xxxxxxx>
> Till: "Robin Rosenberg" <robin.rosenberg@xxxxxxxxxx>, "EGit discussion" <egit-dev@xxxxxxxxxxx>
> Skickat: fredag, 20 dec 2013 12:50:34
> Ämne: locking mechanism
>
> But this preference wouldn't help Laurent in his problem of locking. We
> cannot tell the user
> that model merge only works when this preference is set.
> 
Seems this thread is about everything..

> A quick

No...

> solution to solve this problem could be to add a flag to the
> GitMoveDeleteHook to
> switch off auto staging programmatically. But this seems more like a hack
> for this concrete problem
> which may even cause additional problems, e.g. with threading behavior.

Isn't the issue here that he needs to get access to the lock, not override
the auto-staging?

> A better solution would be to implement a reentrant DirCache lock as
> Laurent proposed already.
> The method DirCache.lock could check if it was already called in the stack
> of the thread and
> in that case just return the instance which was created in a
> previous call in this thread. Only the last unlock call would delete the
> lock file.

I think that would work.

-- robin



Back to the top