def _wait_threads(self):
<EOL>for t in self._threads:<EOL><INDENT>self._to_fetch.put(None)    <EOL><DEDENT>for t in self._threads:<EOL><INDENT>t.join()<EOL><DEDENT>self._threads = []<EOL>
Tell all the threads to terminate (by sending a sentinel value) and
wait for them to do so.