[ https://issues.apache.org/jira/browse/BEAM-4177?focusedWorklogId=97168&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-97168 ]
ASF GitHub Bot logged work on BEAM-4177: ---------------------------------------- Author: ASF GitHub Bot Created on: 01/May/18 18:04 Start Date: 01/May/18 18:04 Worklog Time Spent: 10m Work Description: asfgit closed pull request #430: [BEAM-4177] Clarify thread contraint in Programming Guide 4.3.2 URL: https://github.com/apache/beam-site/pull/430 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/src/documentation/programming-guide.md b/src/documentation/programming-guide.md index 31db9bec2..b94fbeecf 100644 --- a/src/documentation/programming-guide.md +++ b/src/documentation/programming-guide.md @@ -1281,7 +1281,7 @@ Some other serializability factors you should keep in mind are: #### 4.3.2. Thread-compatibility {#user-code-thread-compatibility} Your function object should be thread-compatible. Each instance of your function -object is accessed by a single thread on a worker instance, unless you +object is accessed by a single thread at a time on a worker instance, unless you explicitly create your own threads. Note, however, that **the Beam SDKs are not thread-safe**. If you create your own threads in your user code, you must provide your own synchronization. Note that static members in your function ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 97168) Time Spent: 1h 50m (was: 1h 40m) > Clarify thread constraints in Programming Guide 4.3.2 > ----------------------------------------------------- > > Key: BEAM-4177 > URL: https://issues.apache.org/jira/browse/BEAM-4177 > Project: Beam > Issue Type: Improvement > Components: website > Reporter: John MacMillan > Assignee: Melissa Pashniak > Priority: Trivial > Time Spent: 1h 50m > Remaining Estimate: 0h > > In > [4.3.2|https://beam.apache.org/documentation/programming-guide/#user-code-thread-compatibility], > the sentence "Each instance of your function object is accessed by a single > thread on a worker instance, unless you explicitly create your own threads" > leaves some ambiguity about whether or not the instance is permanently tied > to a single thread, or just restricted to being active on a single thread at > a time. > I suggest a minor change to: > Each instance of your function object is accessed by a single thread at a > time on a worker instance, unless you explicitly create your own threads. > I will prepare a pull request with this change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)