rd-net/RdFramework/Impl/AsyncRdMap.cs [195:233]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OptimizeNested = true; Async = true; } protected override void AssertBindingThread() { } protected override void AssertThreading() { } public override void OnWireReceived(IProtocol proto, SerializationCtx ctx, UnsafeReader stream, IRdWireableDispatchHelper dispatchHelper) { lock (this) base.OnWireReceived(proto, ctx, stream, new DelegatingDispatchHelper(dispatchHelper)); } } private class DelegatingDispatchHelper : IRdWireableDispatchHelper { private readonly IRdWireableDispatchHelper myDispatchHelper; public RdId RdId => myDispatchHelper.RdId; public Lifetime Lifetime => myDispatchHelper.Lifetime; public DelegatingDispatchHelper(IRdWireableDispatchHelper dispatchHelper) { myDispatchHelper = dispatchHelper; } public void Dispatch(IScheduler? scheduler, Action action) { myDispatchHelper.Dispatch(SynchronousScheduler.Instance, action); } } public void Print(PrettyPrinter printer) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rd-net/RdFramework/Impl/AsyncRdSet.cs [217:255]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OptimizeNested = true; Async = true; } protected override void AssertBindingThread() { } protected override void AssertThreading() { } public override void OnWireReceived(IProtocol proto, SerializationCtx ctx, UnsafeReader stream, IRdWireableDispatchHelper dispatchHelper) { lock (this) base.OnWireReceived(proto, ctx, stream, new DelegatingDispatchHelper(dispatchHelper)); } } private class DelegatingDispatchHelper : IRdWireableDispatchHelper { private readonly IRdWireableDispatchHelper myDispatchHelper; public RdId RdId => myDispatchHelper.RdId; public Lifetime Lifetime => myDispatchHelper.Lifetime; public DelegatingDispatchHelper(IRdWireableDispatchHelper dispatchHelper) { myDispatchHelper = dispatchHelper; } public void Dispatch(IScheduler? scheduler, Action action) { myDispatchHelper.Dispatch(SynchronousScheduler.Instance, action); } } public void Print(PrettyPrinter printer) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -