-
Hello,I have a bot command that includes a method which is time-consuming and needs to be executed synchronously. I want to use a thread pool to save this execution object and execute it one by one in another executor. What is the best implementation method? |
Beta Was this translation helpful? Give feedback.
Answered by
Rapptz
May 15, 2023
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nttstar
-
Thanks @Rapptz , the ThreadPoolExecutor class works! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
asyncio
already comes with an executor concept,Loop.run_in_executor
so that should be used.