File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
core/src/main/scala/org/apache/spark/rpc Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ private[spark] trait RpcEnv {
5555 /**
5656 * Register a [[RpcEndpoint ]] with a name and return its [[RpcEndpointRef ]]. [[RpcEnv ]] should
5757 * make sure thread-safely sending messages to [[RpcEndpoint ]].
58+ *
59+ * Thread-safety means processing of one message happens before processing of the next message by
60+ * the same [[RpcEndpoint ]]. In the other words, changes to internal fields of a [[RpcEndpoint ]]
61+ * are visible when processing the next message, and fields in the [[RpcEndpoint ]] need not be
62+ * volatile or equivalent.
63+ *
64+ * However, there is no guarantee that the same thread will be executing the same [[RpcEndpoint ]]
65+ * for different messages.
5866 */
5967 def setupThreadSafeEndpoint (name : String , endpoint : RpcEndpoint ): RpcEndpointRef
6068
You can’t perform that action at this time.
0 commit comments