Skip to content

Commit 3da6547

Browse files
committed
Added synchronized
1 parent dd88444 commit 3da6547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class StreamingContext private[streaming] (
521521
* - StreamingContextState.STOPPED - The context has been stopped and cannot be used any more.
522522
*/
523523
@DeveloperApi
524-
def getState(): StreamingContextState = {
524+
def getState(): StreamingContextState = synchronized {
525525
state
526526
}
527527

0 commit comments

Comments
 (0)