MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / InfoConsumer

Class InfoConsumer

MCSL2Lib/ServerControllers/forge/test.py:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class InfoConsumer(threading.Thread):
20 def __init__(self, infoQueue: Queue):
21 super().__init__()
22 self.infoQueue = infoQueue
23
24 def run(self):
25 while True:
26 get = self.infoQueue.get(block=True, timeout=5)
27 if get is None:
28 print("InfoConsumer: CANCEL detected")
29 return
30 filename, speed, progress, done, allDone = get
31 print(f" - {filename} - {speed}KB/s - {progress}% - {done=} - {allDone=}")
32 if allDone:
33 return
34
35
36if __name__ == "__main__":

Callers 1

test.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected