droolsjbpm/drools — comment on commit 49b3b378922737f6794397f3612918b8bb143bfc
File: drools-core/src/main/java/org/drools/common/UpgradableReentrantReadWriteLock.java line 45
By etirelli:

Is the above thread safe? It seems to me that we will have concurrency problems in several scenarios. E.g.:
T1 executes readLock() method up to line 33. Before executing like 45, it gets preempted by T2 acquiring a write lock (up to line 118), then T1 continues acquiring the read lock (line 45) and finally T2 executes line 119. Many other interactions possible.
Am I missing something?