transform method
Stream<List<Conversation> >
transform(
- Stream<
List< data,Conversation> > - List<
StepDescriptor> steps, - PackedDataCache? cache
Dispatch the stream to local workers and transform using the provided steps
Implementation
Stream<List<Conversation>> transform(Stream<List<Conversation>> data,
List<StepDescriptor> steps, PackedDataCache? cache) async* {
yield* data
.map((data) => run(TransformTask(data, steps, cache: cache))
.then((value) => switch (value) {
TransformResponse result => result.batch,
}))
.transform(SynchronizingTransformer(workers.length));
}