(Inst inst)
| 166 | // alloc() allocates a new thread with the given instruction. |
| 167 | // It uses the free pool if possible. |
| 168 | private Thread alloc(Inst inst) { |
| 169 | Thread t; |
| 170 | if (poolSize > 0) { |
| 171 | poolSize--; |
| 172 | t = pool[poolSize]; |
| 173 | } else { |
| 174 | t = new Thread(matchcap.length); |
| 175 | } |
| 176 | t.inst = inst; |
| 177 | return t; |
| 178 | } |
| 179 | |
| 180 | // Frees all threads on the thread queue, returning them to the free pool. |
| 181 | private void free(Queue queue) { |