We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af5aa6e commit 0c3bf5bCopy full SHA for 0c3bf5b
rxjava-core/src/main/java/rx/operators/OperationInterval.java
@@ -18,6 +18,7 @@
18
import static org.mockito.Matchers.*;
19
import static org.mockito.Mockito.*;
20
21
+import java.util.concurrent.Executors;
22
import java.util.concurrent.TimeUnit;
23
import java.util.concurrent.atomic.AtomicBoolean;
24
@@ -45,7 +46,7 @@ public final class OperationInterval {
45
46
* Creates an event each time interval.
47
*/
48
public static Func1<Observer<Long>, Subscription> interval(long interval, TimeUnit unit) {
- return new Interval(interval, unit, Schedulers.currentThread());
49
+ return new Interval(interval, unit, Schedulers.executor(Executors.newSingleThreadScheduledExecutor()));
50
}
51
52
/**
0 commit comments