All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.wirelabs.jmaps.map.downloader.TileProviderThreadFactory Maven / Gradle / Ivy

The newest version!
package net.wirelabs.jmaps.map.downloader;

import org.jetbrains.annotations.NotNull;

import java.util.concurrent.ThreadFactory;

public class TileProviderThreadFactory implements ThreadFactory {

    int threadsSpawned = 0;

    @Override
    public Thread newThread(@NotNull Runnable runnable) {

        Thread thread = new Thread(runnable, "TileProvider-" + threadsSpawned++);
        thread.setPriority(Thread.MIN_PRIORITY);
        thread.setDaemon(true);
        return thread;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy