Skip to content

Commit

Permalink
Create new executor on init
Browse files Browse the repository at this point in the history
  • Loading branch information
utas-raymondng committed Sep 25, 2024
1 parent d39f362 commit 3ff2536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class IndexerConfig {
@PostConstruct
public void init() {
GeometryUtils.setCellSize(cellSize);
GeometryUtils.setExecutorService(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()));
}

@PreDestroy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class GeometryUtils {
protected static Geometry landGeometry;
// Create an ExecutorService with a fixed thread pool size
@Getter
protected static ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
@Setter
protected static ExecutorService executorService;

@Getter
@Setter
Expand Down

0 comments on commit 3ff2536

Please sign in to comment.