@@ -134,7 +134,7 @@ interface ReplForJupyter {
134134
135135 suspend fun serializeVariables (cellId : Int , topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, callback : (SerializationReply ) -> Unit )
136136
137- suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, pathToDescriptor : List <String > = emptyList(),
137+ suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, commID : String = "", pathToDescriptor : List <String > = emptyList(),
138138 callback : (SerializationReply ) -> Unit )
139139
140140 val homeDir: File ?
@@ -552,9 +552,8 @@ class ReplForJupyterImpl(
552552 doWithLock(SerializationArgs (descriptorsState, cellId = cellId, topLevelVarName = topLevelVarName, callback = callback), serializationQueue, SerializationReply (cellId, descriptorsState), ::doSerializeVariables)
553553 }
554554
555- override suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, pathToDescriptor : List <String >,
556- callback : (SerializationReply ) -> Unit ) {
557- doWithLock(SerializationArgs (descriptorsState, topLevelVarName = topLevelVarName, callback = callback, pathToDescriptor = pathToDescriptor), serializationQueue, SerializationReply (), ::doSerializeVariables)
555+ override suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, commID : String , pathToDescriptor : List <String >, callback : (SerializationReply ) -> Unit ) {
556+ doWithLock(SerializationArgs (descriptorsState, topLevelVarName = topLevelVarName, callback = callback, comm_id = commID ,pathToDescriptor = pathToDescriptor), serializationQueue, SerializationReply (), ::doSerializeVariables)
558557 }
559558
560559 private fun doSerializeVariables (args : SerializationArgs ): SerializationReply {
@@ -569,7 +568,7 @@ class ReplForJupyterImpl(
569568 }
570569 log.debug(" Serialization cellID: $cellId " )
571570 log.debug(" Serialization answer: ${resultMap.entries.first().value.fieldDescriptor} " )
572- return SerializationReply (cellId, resultMap)
571+ return SerializationReply (cellId, resultMap, args.comm_id )
573572 }
574573
575574
@@ -610,6 +609,7 @@ class ReplForJupyterImpl(
610609 var cellId : Int = -1 ,
611610 val topLevelVarName : String = " " ,
612611 val pathToDescriptor : List <String > = emptyList(),
612+ val comm_id : String = " " ,
613613 override val callback : (SerializationReply ) -> Unit
614614 ) : LockQueueArgs<SerializationReply>
615615
0 commit comments