浏览代码

Update grpc to a universal binary (x86_64|arm64). Fix issues with hanging because we were not shutting down a channel.

/develop/update-grpc
Christopher Goy 4 年前
当前提交
ff3a8e4b
共有 6 个文件被更改,包括 524 次插入1487 次删除
  1. 997
      com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
  2. 6
      com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta
  3. 7
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
  4. 1001
      com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
  5. 0
      /com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta

997
com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
文件差异内容过多而无法显示
查看文件

6
com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta


validateReferences: 1
platformData:
- first:
'': Any
: Any
second:
enabled: 0
settings:

Exclude Win64: 1
Exclude iOS: 1
- first:
'': OSXIntel
: OSXIntel
'': OSXIntel64
: OSXIntel64
second:
enabled: 1
settings: {}

7
com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs


/// The Unity to External client.
UnityToExternalProto.UnityToExternalProtoClient m_Client;
Channel m_Channel;
/// <summary>
/// Initializes a new instance of the RPCCommunicator class.

Debug.Log($"Unexpected exception when trying to initialize communication: {ex}");
}
initParametersOut = new UnityRLInitParameters();
m_Channel.ShutdownAsync().Wait();
return false;
}

UnityInputProto Initialize(int port, UnityOutputProto unityOutput, out UnityInputProto unityInput)
{
m_IsOpen = true;
var channel = new Channel($"localhost:{port}", ChannelCredentials.Insecure);
m_Channel = new Channel($"localhost:{port}", ChannelCredentials.Insecure);
m_Client = new UnityToExternalProto.UnityToExternalProtoClient(channel);
m_Client = new UnityToExternalProto.UnityToExternalProtoClient(m_Channel);
var result = m_Client.Exchange(WrapMessage(unityOutput, 200));
var inputMessage = m_Client.Exchange(WrapMessage(null, 200));
unityInput = inputMessage.UnityInput;

try
{
m_Client.Exchange(WrapMessage(null, 400));
m_Channel.ShutdownAsync().Wait();
m_IsOpen = false;
}
catch

1001
com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
文件差异内容过多而无法显示
查看文件

/com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta → /com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存