public final class EventLoopGroup extends CrtResource
CrtResource.ResourceInstance| Constructor and Description |
|---|
EventLoopGroup(int numThreads)
Creates a new event loop group for the I/O subsystem to use to run non-blocking I/O requests
|
EventLoopGroup(int cpuGroup,
int numThreads)
Creates a new event loop group for the I/O subsystem to use to run non-blocking I/O requests.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
static void |
closeStaticDefault()
Closes the static default event loop group, if it exists.
|
CompletableFuture<Void> |
getShutdownCompleteFuture() |
protected void |
releaseNativeHandle()
Stops the event loop group's tasks and frees all resources associated with the the group.
|
static void |
setStaticDefaultNumThreads(int numThreads)
Sets the number of threads for the static default event loop group, should it ever be created.
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResourcespublic EventLoopGroup(int numThreads)
throws CrtRuntimeException
numThreads - The number of threads that the event loop group may run tasks across. Usually 1.CrtRuntimeException - If the system is unable to allocate space for a native event loop grouppublic EventLoopGroup(int cpuGroup,
int numThreads)
throws CrtRuntimeException
cpuGroup - the index of the cpu group to bind to (for example NUMA node 0 would be 0, NUMA node 1 would be 1 etc...)numThreads - The number of threads that the event loop group may run tasks across. Usually 1.CrtRuntimeException - If the system is unable to allocate space for a native event loop groupprotected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately in class CrtResourceprotected void releaseNativeHandle()
releaseNativeHandle in class CrtResourcepublic CompletableFuture<Void> getShutdownCompleteFuture()
public static void setStaticDefaultNumThreads(int numThreads)
numThreads - number of threads for the static default event loop grouppublic static void closeStaticDefault()
Copyright © 2021. All rights reserved.