mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 16:52:18 +00:00
18 lines
368 B
Python
18 lines
368 B
Python
import scrypted_sdk
|
|
from typing import List
|
|
|
|
|
|
def createZygote():
|
|
queue: List[scrypted_sdk.PluginFork] = []
|
|
for i in range(0, 4):
|
|
queue.append(scrypted_sdk.fork())
|
|
|
|
def next():
|
|
while True:
|
|
cur = queue.pop(0)
|
|
queue.append(scrypted_sdk.fork())
|
|
yield cur
|
|
|
|
gen = next()
|
|
return lambda: gen.__next__()
|