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

com.wrapper.spotify.SpotifyApiThreading Maven / Gradle / Ivy

There is a newer version: 9.0.0-RC1
Show newest version
package com.wrapper.spotify;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class SpotifyApiThreading {

  public static final ExecutorService THREADPOOL = Executors.newCachedThreadPool();

  public static  Future executeAsync(final Callable callable) {
    return SpotifyApiThreading.THREADPOOL.submit(new Callable() {
      public T call() throws Exception {
        return callable.call();
      }
    });
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy