This repository was archived by the owner on Feb 8, 2024. It is now read-only.
This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Wrong example usage of CompletableFututure's async methods #13
Open
Description
We have examples like this in the docs:
server.createTextChannelBuilder()
.setName("new-channel")
.create()
.thenAcceptAsync(channel -> {
// This code is already running async, so you can safely use join() here
Message message = channel.sendMessage("First!").join();
message.addReaction("👍").join();
});
thenAcceptAsync(...)
and other async methods use the ForkJoinPool.commonPool()
by default. This pool is bound to the nuber of cpu cores and is not meant to be used for blocking operations.
Metadata
Metadata
Assignees
Labels
No labels