Skip to content

Commit 0c3bf5b

Browse files
author
jmhofer
committed
Switched to a default scheduler that actually works together with this
operator.
1 parent af5aa6e commit 0c3bf5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static org.mockito.Matchers.*;
1919
import static org.mockito.Mockito.*;
2020

21+
import java.util.concurrent.Executors;
2122
import java.util.concurrent.TimeUnit;
2223
import java.util.concurrent.atomic.AtomicBoolean;
2324

@@ -45,7 +46,7 @@ public final class OperationInterval {
4546
* Creates an event each time interval.
4647
*/
4748
public static Func1<Observer<Long>, Subscription> interval(long interval, TimeUnit unit) {
48-
return new Interval(interval, unit, Schedulers.currentThread());
49+
return new Interval(interval, unit, Schedulers.executor(Executors.newSingleThreadScheduledExecutor()));
4950
}
5051

5152
/**

0 commit comments

Comments
 (0)