Package: groovy.concurrent

## [Groovy] Class Dataflows

- groovy.concurrent.Dataflows

-     @CompileStatic
      class Dataflows
      extends Object

  A dynamic map of DataflowVariable instances, providing a concise syntax for dataflow-style programming.

  Property reads block until the variable is bound; property writes bind the variable. Variables are created on demand.

      def df = new Dataflows()

       async { df.z = df.x + df.y
       async { df.x = 10 }
       async { df.y = 5 }

       println "Result: ${df.z}"  // 15
       }

  Inspired by GPars' `Dataflows` class.

  See Also:
    DataflowVariable
  Since:
    6.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Dataflows()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `DataflowVariable` | `getVariable(String name)` Returns the underlying DataflowVariable for the given name without blocking.
    `` | `boolean` | `isBound(String name)` Returns `true` if the named variable has been bound.
    `` | `Object` | `propertyMissing(String name)` Reading a property awaits the corresponding DataflowVariable's value.
    `` | `void` | `propertyMissing(String name, Object value)` Writing a property binds the corresponding DataflowVariable.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Dataflows()

  - ### Method Detail

    - #### DataflowVariable getVariable(String name)

      Returns the underlying DataflowVariable for the given name without blocking. Useful for passing the variable itself (e.g., to `await` or `Awaitable.all`).

      Parameters:
        `name` - the variable name
      Returns:
        the DataflowVariable (created on demand)

    - #### boolean isBound(String name)

      Returns `true` if the named variable has been bound.

      Parameters:
        `name` - the variable name
      Returns:
        `true` if the variable exists and has been bound

    - #### Object propertyMissing(String name)

      Reading a property awaits the corresponding DataflowVariable's value. Creates the variable on demand if it doesn't exist yet.

      Parameters:
        `name` - the variable name
      Returns:
        the bound value of the variable

    - #### void propertyMissing(String name, Object value)

      Writing a property binds the corresponding DataflowVariable. Creates the variable on demand if it doesn't exist yet.

      Parameters:
        `name` - the variable name
        `value` - the value to bind