@staticmethod<EOL><INDENT>def _pool_get(get, results, next_available, task_next_lock, to_skip,task_num, pool_size, id_self):<DEDENT>
log.debug('<STR_LIT>' % id_self)<EOL>sentinels = <NUM_LIT:0><EOL>result_ids, last_result_id, very_last_result_id = {}, {}, {}<EOL>for i in range(task_num):<EOL><INDENT>last_result_id[i] = -<NUM_LIT:1><EOL>very_last_result_id[i] = -<NUM_LIT:2><EOL>result_ids[i] = set()<EOL><DEDENT>while True:<EOL><INDENT>try:<EOL><INDENT>log.debug('<STR_LIT>' % id_self)<EOL>result = get()<EOL><DEDENT>except (IOError, EOFError):<EOL><INDENT>log.error('<STR_LIT>' % id_self)<EOL>break<EOL><DEDENT>if result is None:<EOL><INDENT>sentinels += <NUM_LIT:1><EOL>log.debug('<STR_LIT>' % id_self)<EOL>if sentinels == pool_size:<EOL><INDENT>log.debug('<STR_LIT>' %id_self)<EOL>break<EOL><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if result[<NUM_LIT:1>] is None:<EOL><INDENT>task = result[<NUM_LIT:0>]<EOL>very_last_result_id[task] = result[<NUM_LIT:2>]<EOL>if last_result_id[task] == very_last_result_id[task]:<EOL><INDENT>results[task].put(('<STR_LIT>', False, '<STR_LIT>'))<EOL>next_available[task].put(True)<EOL>log.debug('<STR_LIT>'% (id_self, task))<EOL><DEDENT>continue<EOL><DEDENT>task, i, is_valid, real_result = result<EOL>task_next_lock[task].acquire()<EOL>log.debug('<STR_LIT>' %(id_self, i, task))<EOL>if to_skip[task]:<EOL><INDENT>log.debug('<STR_LIT>' % (id_self,list(range(last_result_id[task] + <NUM_LIT:1>, last_result_id[task] +to_skip[task] + <NUM_LIT:1>))))<EOL>last_result_id[task] += to_skip[task]<EOL>to_skip[task] = <NUM_LIT:0><EOL><DEDENT>if i > last_result_id[task]:<EOL><INDENT>result_ids[task].add(i)<EOL>results[task].put((i, is_valid, real_result))<EOL>log.debug('<STR_LIT>' %(id_self, i, task))<EOL><DEDENT>else:<EOL><INDENT>log.debug('<STR_LIT>' %(id_self, i, task))<EOL><DEDENT>while last_result_id[task] + <NUM_LIT:1> in result_ids[task]:<EOL><INDENT>next_available[task].put(True)<EOL>last_result_id[task] += <NUM_LIT:1><EOL>log.debug('<STR_LIT>' %(id_self, task))<EOL><DEDENT>if last_result_id[task] == very_last_result_id[task]:<EOL><INDENT>results[task].put(('<STR_LIT>', False, '<STR_LIT>'))<EOL>next_available[task].put(True)<EOL><DEDENT>task_next_lock[task].release()<EOL><DEDENT>log.debug('<STR_LIT>' % id_self)<EOL>
(internal) Intended to be run in a separate thread and take results from
the pool and put them into queues depending on the task of the result. 
It finishes if it receives termination-sentinels from all pool workers.