Use thread pools instead of new threads every time a command runs #6

Open
opened 2022-11-22 22:34:11 +01:00 by bea · 1 comment
Owner

Starting threads is very expensive, although acceptable for now to help with JDA's thread-blocking methods. However, using pools with workers would be way better.

Useful Link

Starting threads is very expensive, although acceptable for now to help with JDA's thread-blocking methods. However, using pools with workers would be way better. [Useful Link](https://www.javatpoint.com/java-thread-pool)
bea added the
enhancement
label 2022-11-22 22:34:21 +01:00
Author
Owner

Also look into: Executors.newScheduledThreadPool(), but this might be more useful for the scheduled tasks (as the name suggests) like expired messages, trivia, heartbeat...

Also look into: `Executors.newScheduledThreadPool()`, but this might be more useful for the scheduled tasks (as the name suggests) like expired messages, trivia, heartbeat...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bea/HidekoBot#6
No description provided.