mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Migration Mappings Detection
Still having issues with source locations, would need to check it out first Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -40,6 +40,12 @@ import java.util.stream.Collectors;
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
public class ThreadingUtils {
|
||||
public static <T> void run(T[] values, UnsafeConsumer<T> action) {
|
||||
run(Arrays.stream(values)
|
||||
.<UnsafeRunnable>map(t -> () -> action.accept(t))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
public static <T> void run(Collection<T> values, UnsafeConsumer<T> action) {
|
||||
run(values.stream()
|
||||
.<UnsafeRunnable>map(t -> () -> action.accept(t))
|
||||
|
||||
Reference in New Issue
Block a user