@@ -13,29 +13,29 @@ object Schedulers {
13
13
/**
14
14
* Returns a [[rx.lang.scala.Scheduler ]] that executes work immediately on the current thread.
15
15
*/
16
- def immediate : Scheduler = rx.concurrency.Schedulers .immediate()
16
+ def immediate : Scheduler = Scheduler ( rx.concurrency.Schedulers .immediate() )
17
17
18
18
/**
19
19
* Returns a [[rx.lang.scala.Scheduler ]] that queues work on the current thread to be executed after the current work completes.
20
20
*/
21
- def currentThread : Scheduler = rx.concurrency.Schedulers .currentThread()
21
+ def currentThread : Scheduler = Scheduler ( rx.concurrency.Schedulers .currentThread() )
22
22
23
23
/**
24
24
* Returns a [[rx.lang.scala.Scheduler ]] that creates a new {@link Thread} for each unit of work.
25
25
*/
26
- def newThread : Scheduler = rx.concurrency.Schedulers .newThread
26
+ def newThread : Scheduler = Scheduler ( rx.concurrency.Schedulers .newThread)
27
27
28
28
/**
29
29
* Returns a [[rx.lang.scala.Scheduler ]] that queues work on an `java.util.concurrent.Executor`.
30
30
*
31
31
* Note that this does not support scheduled actions with a delay.
32
32
*/
33
- def executor (executor : Executor ): Scheduler = rx.concurrency.Schedulers .executor(executor)
33
+ def executor (executor : Executor ): Scheduler = Scheduler ( rx.concurrency.Schedulers .executor(executor) )
34
34
35
35
/**
36
36
* Returns a [[rx.lang.scala.Scheduler ]] that queues work on an `java.util.concurrent.ScheduledExecutorService`.
37
37
*/
38
- def executor (executor : ScheduledExecutorService ): Scheduler = rx.concurrency.Schedulers .executor(executor)
38
+ def executor (executor : ScheduledExecutorService ): Scheduler = Scheduler ( rx.concurrency.Schedulers .executor(executor) )
39
39
40
40
/**
41
41
* Returns a [[rx.lang.scala.Scheduler ]] intended for computational work.
@@ -46,7 +46,7 @@ object Schedulers {
46
46
*
47
47
* Do not perform IO-bound work on this scheduler. Use [[rx.lang.scala.concurrency.Schedulers.threadPoolForIO ]] instead.
48
48
*/
49
- def threadPoolForComputation : Scheduler = rx.concurrency.Schedulers .threadPoolForComputation()
49
+ def threadPoolForComputation : Scheduler = Scheduler ( rx.concurrency.Schedulers .threadPoolForComputation() )
50
50
51
51
/**
52
52
* [[rx.lang.scala.Scheduler ]] intended for IO-bound work.
@@ -57,6 +57,6 @@ object Schedulers {
57
57
*
58
58
* Do not perform computational work on this scheduler. Use [[rx.lang.scala.concurrency.Schedulers.threadPoolForComputation ]] instead.
59
59
*/
60
- def threadPoolForIO : Scheduler = rx.concurrency.Schedulers .threadPoolForIO()
60
+ def threadPoolForIO : Scheduler = Scheduler ( rx.concurrency.Schedulers .threadPoolForIO() )
61
61
62
62
}
0 commit comments