Обсуждение: Non-blocking LOCK

Поиск
Список
Период
Сортировка

Non-blocking LOCK

От
"Knut Aksel Røysland"
Дата:
Hi.

How can I request a lock in a non-blocking way? Instead of blocking
until a certain lock can be acquired, I would like my client
applications to give up immediately when a conflicting lock exists.

My wish is that client applications locks the data while it is being
edited, thus making the locks possibly long-lived. Subsequent update
requests to the same data, will then be rejected immediately. I am
hoping to find a server-side solution to this problem, so that rude
clients are unable to circumvent the lock.

Is the "user_locks" module (which "provides support for user-level
long-term cooperative locks") the best approach? It appears that this
solution requires well-behaving clients. Do I have other choices?


Sincerely,
Knut Aksel R�ysland