Skip to content

Commit 6f50049

Browse files
committed
Changed default scheduler used in buffer operation and removed printStackTrace call
1 parent 3ed9f0f commit 6f50049

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rxjava-core/src/main/java/rx/operators/OperationBuffer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public Subscription call(final Observer<List<T>> observer) {
189189
* the {@link Func1} object representing the specified buffer operation.
190190
*/
191191
public static <T> Func1<Observer<List<T>>, Subscription> buffer(Observable<T> source, long timespan, TimeUnit unit) {
192-
return buffer(source, timespan, unit, Schedulers.newThread());
192+
return buffer(source, timespan, unit, Schedulers.threadPoolForComputation());
193193
}
194194

195195
/**
@@ -247,7 +247,7 @@ public Subscription call(final Observer<List<T>> observer) {
247247
* the {@link Func1} object representing the specified buffer operation.
248248
*/
249249
public static <T> Func1<Observer<List<T>>, Subscription> buffer(Observable<T> source, long timespan, TimeUnit unit, int count) {
250-
return buffer(source, timespan, unit, count, Schedulers.newThread());
250+
return buffer(source, timespan, unit, count, Schedulers.threadPoolForComputation());
251251
}
252252

253253
/**
@@ -308,7 +308,7 @@ public Subscription call(final Observer<List<T>> observer) {
308308
* the {@link Func1} object representing the specified buffer operation.
309309
*/
310310
public static <T> Func1<Observer<List<T>>, Subscription> buffer(Observable<T> source, long timespan, long timeshift, TimeUnit unit) {
311-
return buffer(source, timespan, timeshift, unit, Schedulers.newThread());
311+
return buffer(source, timespan, timeshift, unit, Schedulers.threadPoolForComputation());
312312
}
313313

314314
/**
@@ -370,7 +370,6 @@ public void onError(Exception e) {
370370
creator.stop();
371371
buffers.emitAllBuffers();
372372
observer.onError(e);
373-
e.printStackTrace();
374373
}
375374

376375
@Override

0 commit comments

Comments
 (0)