Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected void doStart() throws SensorHubException

// init thread pool
threadPool = Executors.newScheduledThreadPool(
Runtime.getRuntime().availableProcessors(),
config.threadPoolSize <= 0 ? Runtime.getRuntime().availableProcessors() : config.threadPoolSize,
new NamedThreadFactory("CSApi-Pool"));

// init timeout monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public class ConSysApiServiceConfig extends OGCServiceConfig
public List<String> uriPrefixMap = new ArrayList<>();


@DisplayInfo(label="Thread Pool Size", desc="Number of threads used by the service to handle incoming requests. " +
"When this value is <= 0, the size of the thread pool will be equal to the available number of CPU processors.")
public int threadPoolSize = 0;


public ConSysApiServiceConfig()
{
this.moduleClass = ConSysApiService.class.getCanonicalName();
Expand Down
Loading