From: Sasa M. <sa...@us...> - 2004-06-29 12:28:18
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4370/org/jrobin/core Modified Files: RrdMemoryBackend.java Log Message: Fixed problem with thread synchronization with in-memory backends Index: RrdMemoryBackend.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdMemoryBackend.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RrdMemoryBackend.java 29 Jun 2004 09:02:22 -0000 1.3 --- RrdMemoryBackend.java 29 Jun 2004 12:28:09 -0000 1.4 *************** *** 38,42 **** } ! protected void write(long offset, byte[] b) throws IOException { int pos = (int) offset; for(int i = 0; i < b.length; i++) { --- 38,42 ---- } ! protected synchronized void write(long offset, byte[] b) throws IOException { int pos = (int) offset; for(int i = 0; i < b.length; i++) { *************** *** 45,49 **** } ! protected void read(long offset, byte[] b) throws IOException { int pos = (int) offset; if(pos + b.length <= buffer.length) { --- 45,49 ---- } ! protected synchronized void read(long offset, byte[] b) throws IOException { int pos = (int) offset; if(pos + b.length <= buffer.length) { |