sparse-intern-71089
12/20/2020, 7:08 AMlemon-agent-27707
12/20/2020, 6:19 PMlanguageRuntimeServer
and passes its address to the engine via the CLI. The server waits for the engine to call the Run gRPC method. The server has a lock to make sure that the engine doesn't try to start two concurrent updates on the server (could be a retry, guarding against future implementation changes).tall-needle-56640
12/21/2020, 4:11 PMThread A entersRun()
Thread A gets the lock, sets the state fromtowaiting
, and releases the lockrunning
Thread A callsRunWithContext()
Thread B entersRun()
Thread B gets the lock, sets the state fromtorunning
, and releases the lockrunning
Thread B calls// Current updates!RunWithContext()
Thread A gets the lock, sets the state fromtorunning
, and releases the lockfinished
Thread B gets the lock, sets the state fromtofinished
, and releases the lockfinished
lemon-agent-27707
12/21/2020, 4:27 PMlemon-agent-27707
12/21/2020, 4:30 PM