ronshapiro / rxjava-priority-scheduler

An RxJava scheduler that incorporates priorities in scheduling tasks
55 stars 6 forks source link

Android studio error : PriorityScheduler(int) has private access in me. ronshapiro.rx.priority.PriorityScheduler #5

Closed j2emanue closed 8 years ago

j2emanue commented 8 years ago

as soon as i drop your example into my android project in android studio it says PriorityScheduler(int) has private access in me. ronshapiro.rx.priority.PriorityScheduler How can this be fixed ? Here is the code im running, simply a copy and almost paste of your example:

final int PRIORITY_HIGH = 10; final int PRIORITY_LOW = 1;

    PriorityScheduler scheduler = new PriorityScheduler();//fails here
    Observable.just(1, 2, 3, 4, 5)
            .subscribeOn(scheduler.priority(PRIORITY_LOW));
    // .subscribe(System.out::println);

    Observable.just(6, 7, 8, 9, 10)
            .subscribeOn(scheduler.priority(PRIORITY_HIGH));
    // .subscribe(System.out::println);
ronshapiro commented 8 years ago

Check out PriorityScheduler.create() and PriorityScheduler.withConcurrency(int) instead