Changeset 11984


Ignore:
Timestamp:
06/01/09 20:52:17 (12 years ago)
Author:
ehuelsmann
Message:

Delete the fcnsize field: in a multiprocessing
environment, this is one huge race. Also, its value
isn't used for anything but bookkeeping anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/util/RandomAccessCharacterFile.java

    r11983 r11984  
    259259    private RandomAccessOutputStream outputStream;
    260260    private FileChannel fcn;
    261     private long fcnsize; /* the file size */
    262261 
    263262    private Charset cset;
     
    281280
    282281        fcn = raf.getChannel();
    283         fcnsize = fcn.size();
    284282
    285283        cset = (encoding == null) ? Charset.defaultCharset() : Charset.forName(encoding);
     
    394392            CoderResult r = cenc.encode(cbuf, bbuf, endOfFile);
    395393            bbufIsDirty = true;
    396             long curpos = bbufpos + bbuf.position();
    397             if (curpos > fcnsize) {
    398                 // the file is extended.
    399                 fcnsize = curpos;
    400             }
    401394            if (CoderResult.OVERFLOW == r || bbuf.remaining() == 0) {
    402395                flushBbuf();
     
    516509                flushBbuf();
    517510            fcn.write(ByteBuffer.wrap(b, off, len));
    518             fcnsize = fcn.size();
    519511        }
    520512        while (pos < off + len) {
     
    526518            pos += want;
    527519            bbufIsDirty = true;
    528             long curpos = bbufpos + bbuf.position();
    529             if (curpos > fcnsize) {
    530                 // the file is extended.
    531                 fcnsize = curpos;
    532             }
    533520            if (bbuf.remaining() == 0) {
    534521                flushBbuf();
Note: See TracChangeset for help on using the changeset viewer.