Skip to content

Commit

Permalink
Update programming-guide.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tvalentyn authored Oct 13, 2023
1 parent 6b6977d commit 160d244
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1214,10 +1214,10 @@ Here is a sequence diagram that shows the lifecycle of the DoFn during
apply to the objects or particular cases such as failover or
instance reuse. They also give instantiation use cases. Three key points
to note are that:
1. teardown is done on a best effort basis and thus
1. Teardown is done on a best effort basis and thus
isn't guaranteed.
2. the number of DoFn instances created at runtime is runner-dependent.
3. for the Python SDK, the pipeline contents such as DoFn user code,
2. The number of DoFn instances created at runtime is runner-dependent.
3. For the Python SDK, the pipeline contents such as DoFn user code,
is [serialized into a bytecode](https://beam.apache.org/documentation/sdks/python-pipeline-dependencies/#pickling-and-managing-the-main-session). Therefore, `DoFn`s should not reference objects that are not serializable, such as locks. To manage a single instance of an object across multiple `DoFn` instances in the same process, use utilities in the [shared.py](https://beam.apache.org/releases/pydoc/current/apache_beam.utils.shared.html) module.

<!-- The source for the sequence diagram can be found in the SVG resource. -->
Expand Down

0 comments on commit 160d244

Please sign in to comment.