Skip to content

Commit

Permalink
remove last synchronized instance
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Jul 16, 2024
1 parent f67c408 commit 83a8d43
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions java/org/jlab/coda/jevio/EventWriterUnsyncV4.java
Original file line number Diff line number Diff line change
Expand Up @@ -2033,9 +2033,8 @@ public void setFirstEvent(EvioNode node)
* By its nature this method is not useful for writing to a buffer since
* it is never split and the event can be written to it as any other.<p>
*
* The method {@link #writeEvent} calls writeCommonBlock() which, in turn,
* only gets called when synchronized. So synchronizing this method will
* make sure firstEvent only gets set while nothing is being written.
* Do not call this while simultaneously calling
* close, flush, writeEvent, or getByteBuffer.
*
* @param buffer buffer containing event to be placed first in each file written
* including all splits. If null, no more first events are written
Expand All @@ -2048,7 +2047,7 @@ public void setFirstEvent(EvioNode node)
* if file exists but user requested no over-writing;
* if no room when writing to user-given buffer;
*/
synchronized public void setFirstEvent(ByteBuffer buffer)
public void setFirstEvent(ByteBuffer buffer)
throws EvioException, IOException {

// If getting rid of the first event ...
Expand Down Expand Up @@ -3001,12 +3000,7 @@ public boolean writeEvent(EvioNode node, boolean force, boolean duplicate)
// It don't think it matters since node knows where to
// go inside the buffer.
// if (!duplicate) {
// if (pos > origLim) {
// bb.position(origPos).limit(origLim);
// }
// else {
// bb.limit(origLim).position(origPos);
// }
// bb.limit(origLim).position(origPos);
// }
}

Expand Down

0 comments on commit 83a8d43

Please sign in to comment.