MCPcopy
hub / github.com/microsoft/qlib / __iter__

Method __iter__

qlib/rl/utils/data_queue.py:150–157  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

148 self.cleanup()
149
150 def __iter__(self) -> Generator[Any, None, None]:
151 if not self._activated:
152 raise ValueError(
153 "Need to call activate() to launch a daemon worker "
154 "to produce data into data queue before using it. "
155 "You probably have forgotten to use the DataQueue in a with block.",
156 )
157 return self._consumer()
158
159 def _consumer(self) -> Generator[Any, None, None]:
160 while True:

Callers

nothing calls this directly

Calls 1

_consumerMethod · 0.95

Tested by

no test coverage detected