:eventloopsourcedir: {core}/src/main/java

=== Event Loop Group

By default `Reactor Netty` uses an "`Event Loop Group`", where the number of the worker threads equals the number of
processors available to the runtime on initialization (but with a minimum value of 4). This "`Event Loop Group`" is shared between all servers and clients in one JVM.
When you need a different configuration, you can use one of the {javadoc}/reactor/netty/resources/LoopResources.html[`LoopResources`]`#create` methods.

The following listing shows the default configuration for the Event Loop Group:

{core-source-link}/reactor/netty/ReactorNetty.java
[%unbreakable]
----
include::{eventloopsourcedir}/reactor/netty/ReactorNetty.java[lines=87..121]
----

If you need changes to these settings, you can apply the following configuration:

{examples-link}/eventloop/Application.java
[%unbreakable]
----
include::{examples-dir}/eventloop/Application.java[lines=18..38]
----

==== Disposing Event Loop Group

- If you use the default `Event Loop Group` provided by Reactor Netty, invoke
{javadoc}/reactor/netty/http/HttpResources.html[`HttpResources`]`#disposeLoopsAndConnections`/`#disposeLoopsAndConnectionsLater` method.

NOTE: Disposing `HttpResources` means that every server/client that is using it, will not be able to use it anymore!

- If you use custom `LoopResources`, invoke {javadoc}/reactor/netty/resources/LoopResources.html[`LoopResources`]`#dispose`/`#disposeLater` method.

NOTE: Disposing the custom `LoopResources` means that every server/client that is configured to use it, will not be able to use it anymore!
