Posts

Showing posts from February 4, 2019

Paeonia (kingdom)

Image
"Paionia" redirects here. For the municipality in northern Greece, see Paionia (municipality). For the deme of ancient Attica, see Paeonidae. The Paeonian tribes The Paeonians next to Odrysian Kingdom Paionians & the kingdom of Macedon In antiquity, Paeonia or Paionia ( / p iː ˈ oʊ n i ə / ; Greek: Παιονία ) was the land and kingdom of the Paeonians ( Παίονες ). In the Iliad, the Paeonians are said to have been allies of the Trojans. During the Persian invasion of Greece the conquered Paeonians as far as the Lake Prasias, including the Paeoplae and Siropaiones, were deported from Paeonia to Asia. [1] In 355–354 BC, Philip II of Macedon took advantage of the death of King Agi of Paeonia and campaigned against them in order to conquer them. So the southern part of ancient Paeonia was annexed by the ancient kingdom of Macedon and was named "Macedonian Paeonia"; this section included the cities Astraion (later Stromnitsa) Stenae (near modern De

ExecutorService and AtomicInteger : RejectedExecutionException

Image
0 1 I want atomicInteger to have a value of 100 then the program terminates public static void main(String args) throws InterruptedException { ExecutorService executor = Executors.newSingleThreadExecutor(); AtomicInteger atomicInteger = new AtomicInteger(0); do { executor.submit(() -> { System.out.println(atomicInteger.getAndAdd(10)); if (atomicInteger.get() == 100) { //executor.shutdownNown(); } }); } while (true); } I have error Exception in thread "main" java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@1d8d10a rejected from java.util.concurrent.ThreadPoolExecutor@9e54c2[Terminated, pool size = 0, active threads = 0, qu