Skip to content

Commit

Permalink
Release v3.3+fabric-1.20.X
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCSDev committed Oct 15, 2023
1 parent 3cd92bc commit dbe5b72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.concurrent.TimeUnit;
import java.util.function.BooleanSupplier;

import org.jetbrains.annotations.ApiStatus.Experimental;

import com.google.common.collect.Queues;

import io.github.thecsdev.tcdcommons.api.util.collections.IdealList;
Expand Down Expand Up @@ -94,7 +96,9 @@ public static void scheduleTask(
* Once the task is executed, it will never be executed again.
* @apiNote Note that the {@link ReentrantThreadExecutor} may shut down before the task gets to execute.
* @apiNote Also note that this system does not track game's ticks, aka it uses a time-frame independent from ticks.
* @apiNote Submitting tasks whose conditions cannot be met will result in a memory leak.
*/
@Experimental
public static void executeOnce(
final ReentrantThreadExecutor<?> minecraftClientOrServer,
final BooleanSupplier condition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.concurrent.TimeUnit;
import java.util.function.BooleanSupplier;

import org.jetbrains.annotations.ApiStatus.Experimental;

import com.google.common.collect.Queues;

import io.github.thecsdev.tcdcommons.api.util.collections.IdealList;
Expand Down Expand Up @@ -94,7 +96,9 @@ public static void scheduleTask(
* Once the task is executed, it will never be executed again.
* @apiNote Note that the {@link ReentrantThreadExecutor} may shut down before the task gets to execute.
* @apiNote Also note that this system does not track game's ticks, aka it uses a time-frame independent from ticks.
* @apiNote Submitting tasks whose conditions cannot be met will result in a memory leak.
*/
@Experimental
public static void executeOnce(
final ReentrantThreadExecutor<?> minecraftClientOrServer,
final BooleanSupplier condition,
Expand Down

0 comments on commit dbe5b72

Please sign in to comment.