code: public static Schedulers newThreadPoolScheduler(int poolSize) {
          createSingleton();
          Schedulers.increaseNoOfSchedullers();
          ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
          CustomizableThreadFactory factory = new CustomizableThreadFactory();
          scheduler.initializeExecutor(factory, new RejectedExecutionHandler() {
              @Override
              public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
                  System.out.println("asdsa");
              }
          });
          scheduler.setPoolSize(poolSize);
          instance.setCurrentScheduler(scheduler);
          return instance;
      }
docs: New thread pool scheduler.
  
  @param poolSize
  the pool size
  @return the schedulers