SyncStream#

Understand request ownership, phases, and runtime limits. See the guide.

class zett_agent.sync_runtime.SyncStream(runtime, factory)[源代码]#

Pull async events synchronously, preserving one task and bounded memory.

A stream has one consumer. Another thread may call close() to interrupt a blocked consumer. Exhaustion, errors, and close release the source iterator. Do not rely on garbage collection to close an abandoned stream.

参数:
  • runtime (SyncRuntime)

  • factory (Callable[[], AsyncIterator[_T]])

close()[源代码]#

Stop consumption and wait until the async source has been closed.

返回类型:

None