lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan, Brad (Wokingham)" <Brad.Al...@Fiserv.com>
Subject RAMDirectory code - locking?
Date Tue, 19 Mar 2013 17:22:44 GMT
There are a number of

'lock (this)'

statements in the code?



Just wanting to check this has been considered and was considered safe.



I'm used to seeing the use of some sort of Locker object to do this.



Public class Bla {

         private static Object locker = new Object();



         Public void someMethod() {

                 Lock(locker) {

                          //do some stuff!

                 }

         }
}

Brad Allan
Development Lead
Risk & Compliance
Fiserv
Office: +44 (0) 845 013 1137
Mobile: +44 (0) 7866 720024
www.fiserv.com<http://www.fiserv.com/>


________________________________

CheckFree Solutions Limited (trading as Fiserv)
Registered Office: Eversheds House, 70 Great Bridgewater Street, Manchester, M15 ES
Registered in England: No. 2694333

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message