O'Reilly logo

Reactive Programming With Java 9 by Tejaswini Mandar Jog

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The SubmissionPublisher class

The SubmissionPublisher class is an implementation of the Publisher interface whose role is to emit the data. The SubmissionPublisher class uses the supplied Executor, which delivers to the Subscriber. The developers are free to use any Executor depending upon the scenario in which they are working.

Executors.newFixedThreadPool (int num_of_threads) and ForkJoinPool.commonPool are some favorites of developers. Executors.newFixedThreadPool facilitates the creation of a thread pool with a fixed number of threads for the operation. Each thread in the pool will exist unless it has not been shut down explicitly. ForkJoinPool.commonPool is the default Executor used by SubsmissionPublisher. ForkJoinPool.commonPool returns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required