public static <I, P, R> WorkerTask<I, P, R> of(@NonNull final String globalId, @NonNull final Func3<I, Consumer<P>, Supplier<Boolean>, R> taskFunction, @Nullable final Scheduler taskScheduler) {
        return of(globalId, input -> Observable.create(emit -> {
            final R result = taskFunction.call(input, p -> emit.onNext(TaskValue.progress(p)), emit::isDisposed);
            emit.onNext(TaskValue.result(result));
            emit.onComplete();
        }), taskScheduler, null);
    }
Simplified version to create a standard task w/o dealing with JavaRx
main/src/main/java/cgeo/geocaching/utils/workertask/WorkerTask.java