Skip to content

Commit

Permalink
use virtual threads to handle requests
Browse files Browse the repository at this point in the history
  • Loading branch information
YouHaveTrouble committed Nov 4, 2023
1 parent b48b2e4 commit dcfc9fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/youhavetrouble/meapi/MeAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.io.IOException;
import java.util.Timer;
import java.util.concurrent.Executors;
import java.util.logging.Logger;

public class MeAPI {
Expand All @@ -33,7 +34,7 @@ public static void main(String[] args) throws IOException {
}
}

JankWebServer webServer = JankWebServer.create(port, 16);
JankWebServer webServer = JankWebServer.create(port, Executors.newVirtualThreadPerTaskExecutor());

String discordBotKey = getEnvValue("DISCORD_BOT_KEY");
if (discordBotKey != null) {
Expand Down

0 comments on commit dcfc9fc

Please sign in to comment.