Updates the default EventLoopGroup to use 1 thread per available processor,
Permits customization of the ELG via the eventLoopGroup init parameter,
Adds an optional timeout: HTTPClient.Configuration.Timeout parameter to RestRequest.init(),
Adds tests for request timeout and customization of the EventLoopGroup.
Also updates the version of async-http-client to 1.0.0 (resolves #79)
Motivation
RestRequest currently uses a global EventLoopGroup containing a single thread. This is sufficient for simple applications, however for highly parallel applications it creates a bottleneck.
Also, there is currently no way to configure the timeout for requests, and HTTPClient's default is to set no timeouts. This could leave an application stuck indefinitely.
This PR:
EventLoopGroup
to use 1 thread per available processor,eventLoopGroup
init parameter,timeout: HTTPClient.Configuration.Timeout
parameter toRestRequest.init()
,Also updates the version of
async-http-client
to 1.0.0 (resolves #79)Motivation
RestRequest
currently uses a global EventLoopGroup containing a single thread. This is sufficient for simple applications, however for highly parallel applications it creates a bottleneck.Also, there is currently no way to configure the timeout for requests, and HTTPClient's default is to set no timeouts. This could leave an application stuck indefinitely.