Revision 1135 org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/tile/impl/pool/ThreadPoolImpl.java
ThreadPoolImpl.java | ||
---|---|---|
118 | 118 |
* @param listener |
119 | 119 |
*/ |
120 | 120 |
public void emptyPool() { |
121 |
//Don't get and set more tiles |
|
122 |
for (int i = 0; i < threadList.length; i++) { |
|
123 |
threadList[i].cancelTaskInProgress(); |
|
124 |
} |
|
125 |
|
|
126 |
//Cleans queues |
|
121 | 127 |
synchronized (tasks) { |
122 | 128 |
tasks.clear(); |
123 |
for (int i = 0; i < threadList.length; i++) { |
|
124 |
threadList[i].cancelTaskInProgress(); |
|
125 |
} |
|
126 | 129 |
getTilePipe().clear(); |
127 | 130 |
tasks.notifyAll(); |
128 | 131 |
} |
132 |
|
|
133 |
//Gets tiles again |
|
134 |
for (int i = 0; i < threadList.length; i++) { |
|
135 |
threadList[i].resumeTasks(); |
|
136 |
} |
|
129 | 137 |
} |
130 | 138 |
|
131 | 139 |
public LinkedList<AtomicTask> getInputTaskList() { |
... | ... | |
144 | 152 |
|
145 | 153 |
/** |
146 | 154 |
* Stops all threads in the list and sets the list to null |
155 |
* @deprecated |
|
147 | 156 |
*/ |
148 | 157 |
public void destroyPool() { |
149 | 158 |
for (int i = 0; i < NTHREADS_POOL; i++) { |
Also available in: Unified diff