Re: deadlock in TestCrash

2009-11-27 Thread Michael McCandless
True... I'll make that change too. Mike On Fri, Nov 27, 2009 at 12:56 PM, Jason Rutherglen wrote: > If syncing on directory is not important, then sizeInBytes can be an > AtomicLong? > > On Fri, Nov 27, 2009 at 8:37 AM, Michael McCandless > wrote: >> RAMFile has this method: >> >>  final synch

Re: deadlock in TestCrash

2009-11-27 Thread Jason Rutherglen
If syncing on directory is not important, then sizeInBytes can be an AtomicLong? On Fri, Nov 27, 2009 at 8:37 AM, Michael McCandless wrote: > RAMFile has this method: > >  final synchronized byte[] addBuffer(int size) { >    byte[] buffer = newBuffer(size); >    if (directory!=null) >      synchr

deadlock in TestCrash

2009-11-27 Thread Michael McCandless
RAMFile has this method: final synchronized byte[] addBuffer(int size) { byte[] buffer = newBuffer(size); if (directory!=null) synchronized (directory) { // Ensure addition of buffer and adjustment to directory size are atomic wrt directory buffers.add(buffer);