Skip to content

Commit 526de97

Browse files
committed
set max sizes on the pools
1 parent 5459684 commit 526de97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/com/mongodb/ByteDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected void done(){
4949
_pool.done( this );
5050
}
5151

52-
final static SimplePool<ByteDecoder> _pool = new SimplePool<ByteDecoder>( "ByteDecoders" , NUM_ENCODERS * 3 , -1 ){
52+
final static SimplePool<ByteDecoder> _pool = new SimplePool<ByteDecoder>( "ByteDecoders" , NUM_ENCODERS * 3 , NUM_ENCODERS * 6 ){
5353

5454
protected ByteDecoder createNew(){
5555
if ( D ) System.out.println( "creating new ByteDecoder" );

src/main/com/mongodb/ByteEncoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected void done(){
9999
_pool.done( this );
100100
}
101101

102-
final static SimplePool<ByteEncoder> _pool = new SimplePool<ByteEncoder>( "ByteEncoders" , NUM_ENCODERS , -1 ){
102+
final static SimplePool<ByteEncoder> _pool = new SimplePool<ByteEncoder>( "ByteEncoders" , NUM_ENCODERS , NUM_ENCODERS * 2 ){
103103
protected ByteEncoder createNew(){
104104
if ( D ) System.out.println( "creating new ByteEncoder" );
105105
return new ByteEncoder();

0 commit comments

Comments
 (0)