@@ -139,7 +139,7 @@ interface ReplForJupyter {
139139
140140 suspend fun serializeVariables (cellId : Int , topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, callback : (SerializationReply ) -> Unit )
141141
142- suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, pathToDescriptor : List <String > = emptyList(),
142+ suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, commID : String = "", pathToDescriptor : List <String > = emptyList(),
143143 callback : (SerializationReply ) -> Unit )
144144
145145 val homeDir: File ?
@@ -568,9 +568,8 @@ class ReplForJupyterImpl(
568568 doWithLock(SerializationArgs (descriptorsState, cellId = cellId, topLevelVarName = topLevelVarName, callback = callback), serializationQueue, SerializationReply (cellId, descriptorsState), ::doSerializeVariables)
569569 }
570570
571- override suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, pathToDescriptor : List <String >,
572- callback : (SerializationReply ) -> Unit ) {
573- doWithLock(SerializationArgs (descriptorsState, topLevelVarName = topLevelVarName, callback = callback, pathToDescriptor = pathToDescriptor), serializationQueue, SerializationReply (), ::doSerializeVariables)
571+ override suspend fun serializeVariables (topLevelVarName : String , descriptorsState : Map <String , SerializedVariablesState >, commID : String , pathToDescriptor : List <String >, callback : (SerializationReply ) -> Unit ) {
572+ doWithLock(SerializationArgs (descriptorsState, topLevelVarName = topLevelVarName, callback = callback, comm_id = commID ,pathToDescriptor = pathToDescriptor), serializationQueue, SerializationReply (), ::doSerializeVariables)
574573 }
575574
576575 private fun doSerializeVariables (args : SerializationArgs ): SerializationReply {
@@ -585,7 +584,7 @@ class ReplForJupyterImpl(
585584 }
586585 log.debug(" Serialization cellID: $cellId " )
587586 log.debug(" Serialization answer: ${resultMap.entries.first().value.fieldDescriptor} " )
588- return SerializationReply (cellId, resultMap)
587+ return SerializationReply (cellId, resultMap, args.comm_id )
589588 }
590589
591590
@@ -626,6 +625,7 @@ class ReplForJupyterImpl(
626625 var cellId : Int = -1 ,
627626 val topLevelVarName : String = " " ,
628627 val pathToDescriptor : List <String > = emptyList(),
628+ val comm_id : String = " " ,
629629 override val callback : (SerializationReply ) -> Unit
630630 ) : LockQueueArgs<SerializationReply>
631631
0 commit comments