Skip to content

Commit

Permalink
start background threads after worker pool
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Sep 28, 2024
1 parent 22e2d07 commit 6dd2202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/app/attestation/server/AttestationServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,6 @@ INSERT INTO Attestations (
attestationConn.dispose();
}

new Thread(new AlertDispatcher()).start();
new Thread(new Maintenance()).start();

final ThreadPoolExecutor executor = new ThreadPoolExecutor(32, 32, 0, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(1024));
executor.prestartAllCoreThreads();

Expand All @@ -503,6 +500,9 @@ INSERT INTO Attestations (
server.createContext("/submit", new SubmitHandler());
server.setExecutor(executor);
server.start();

new Thread(new AlertDispatcher()).start();
new Thread(new Maintenance()).start();
}

private static String getRequestHeaderValue(final HttpExchange exchange, final String header)
Expand Down

0 comments on commit 6dd2202

Please sign in to comment.