I understand what livelock is but I was wondering if anyone had a good code-based example of it? And by code-based, I do NOT mean "two people trying to get past each other in a corridor". If I read that again, I'll lose my lunch.
...
Summary:
It seems to me that:
wrapping fields representing a logical state into a single immutable consumable object
updating the object's authoritative reference with a call to Interlocked.CompareExchange<T>
and handling update failures appropriately
provides a kind of concurrency that renders the "lock" construct not only unnecess...
I run a moderately popular web app on Django with Apache2, mod_python, and PostgreSQL 8.3 with the postgresql_psycopg2 database backend. I'm experiencing occasional livelock, identifiable when an apache2 process continually consumes 99% of CPU for several minutes or more.
I did an strace -ppid on the apache2 process, and found that it w...
What pattern/architecture do you use in a 3-tiered application using NHibernate that needs to support retries on transaction failures, when you are using the Session-Per-Request pattern? (as ISession becomes invalid after an exception, even if this is a deadlock or timeout or livelock exception).
...