Skip to main content

DPF Mechanical 2026 R1

producer_consumer_for_each class

Last update: 18.06.2026

Namespace: Ans.DataProcessing.operators.utility

Summary

Allows to write a loop over operators by connecting data to iterate and by requesting the incrementally output merged.The chain of Operators are split into a first part: the producers and a second part: the consumers. These 2 parts will run asynchronously on 2 threads.

available inputs: producer_consumer_iterableq (object), forward1 (object), forward2 (object)

available outputs: empty (object), output1 (object), output2 (object)

Example

op = producer_consumer_for_each()

op = producer_consumer_for_each(producer_consumer_iterableq=my_producer_consumer_iterableq,forward1=my_forward1,forward2=my_forward2)

Class Information

Property Value
Namespace Ans.DataProcessing.operators.utility
Assembly Ans_Dpf_Native_dll_cs
Base Class Ans.DataProcessing.internal_objects.BaseOperator

Inputs

producer_consumer_iterableq

The result of the make_producer_consumer_for_each_iterator operator.

Type: LinkableInput

forward1

output of the last operators of the workflow

Type: LinkableInput

forward2

output of the last operators of the workflow

Type: LinkableInput

Outputs

empty

Type: LinkableOutput

output1

Type: LinkableOutput

output2

Type: LinkableOutput

Constructors

Constructor

producer_consumer_for_each()

Constructor

producer_consumer_for_each(producer_consumer_iterableq, forward1, forward2, config)

Parameters:

  • producer_consumer_iterableq (object)
  • forward1 (object)
  • forward2 (object)
  • config (OperatorConfig)

Constructor

producer_consumer_for_each(config)

Parameters:

  • config (OperatorConfig)

Methods

Properties

inputs

Type: InputSpec

# Get or set the property
value = obj.inputs
obj.inputs = new_value

outputs

Type: OutputSpec

# Get or set the property
value = obj.outputs
obj.outputs = new_value

defaultConfig

Type: Config

# Get the property (read-only)
value = obj.defaultConfig

Connect with Ansys