Package net.ME1312.Galaxi.Library
Class Merger
java.lang.Object
net.ME1312.Galaxi.Library.Merger
Thread Merger Class
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Merger
Create a Thread Consolidator- Parameters:
action
- Resulting Action (this is run in the last existing thread upon completion)
-
Merger
Create a Thread Consolidator- Parameters:
thread
- Resulting Thread (this is started upon completion)
-
-
Method Details
-
reserved
public int reserved()See how many threads are still active- Returns:
- Reservation count
-
reserve
public void reserve()Call this before starting a thread -
reserve
public void reserve(int amount) Call this before starting multiple threads- Parameters:
amount
- Amount of threads
-
release
public void release()Call this at the end of each thread
-