// Resume is called on the copy on some completing thread, whereupon work continues on that thread. // BusyCount is Decremented as the copy is now complete public void Resume(out bool alreadyResumedNoLock) { try { alreadyResumedNoLock = _alreadyResumed; _alreadyResumed = true; _rpc._switchedThreads = true; if (_rpc.Process(false) && !_rpc.InvokeNotification.DidInvokerEnsurePump) { _rpc.EnsureReceive(); } } finally { _rpc.DecrementBusyCount(); } }
private void ProcessMessage41(ref MessageRpc rpc) { rpc.NextProcessor = _processMessage5; // This needs to happen after LockInstance--LockInstance guarantees // in-order delivery, so we can't receive the next message until we // have acquired the lock. // // This also needs to happen after BindThread, since // running on UI thread should guarantee in-order delivery if // the SynchronizationContext is single threaded. if (_concurrency.IsConcurrent(ref rpc)) { rpc.EnsureReceive(); } _instance.EnsureServiceInstance(ref rpc); if (!rpc.IsPaused) { this.ProcessMessage5(ref rpc); } }
void ProcessMessage41(ref MessageRpc rpc) { rpc.NextProcessor = this.processMessage5; // This needs to happen after LockInstance--LockInstance guarantees // in-order delivery, so we can't receive the next message until we // have acquired the lock. // // This also needs to happen after BindThread, since EricZ believes // that running on UI thread should guarantee in-order delivery if // the SynchronizationContext is single threaded. // Note: for IManualConcurrencyOperationInvoker, the invoke assumes full control over pumping. if (this.concurrency.IsConcurrent(ref rpc) && !(rpc.Operation.Invoker is IManualConcurrencyOperationInvoker)) { rpc.EnsureReceive(); } this.instance.EnsureServiceInstance(ref rpc); if (!rpc.IsPaused) { this.ProcessMessage5(ref rpc); } else if (this.isOnServer && DiagnosticUtility.ShouldTraceInformation && !this.didTraceProcessMessage41) { this.didTraceProcessMessage41 = true; TraceUtility.TraceEvent( TraceEventType.Information, TraceCode.MessageProcessingPaused, SR.GetString(SR.TraceCodeProcessMessage4Paused, rpc.Channel.DispatchRuntime.EndpointDispatcher.ContractName, rpc.Channel.DispatchRuntime.EndpointDispatcher.EndpointAddress)); } }
private void ProcessMessage41(ref MessageRpc rpc) { rpc.NextProcessor = this.processMessage5; if (this.concurrency.IsConcurrent(ref rpc) && !(rpc.Operation.Invoker is IManualConcurrencyOperationInvoker)) { rpc.EnsureReceive(); } this.instance.EnsureServiceInstance(ref rpc); if (!rpc.IsPaused) { this.ProcessMessage5(ref rpc); } else if ((this.isOnServer && DiagnosticUtility.ShouldTraceInformation) && !this.didTraceProcessMessage41) { this.didTraceProcessMessage41 = true; TraceUtility.TraceEvent(TraceEventType.Information, 0x80027, System.ServiceModel.SR.GetString("TraceCodeProcessMessage4Paused", new object[] { rpc.Channel.DispatchRuntime.EndpointDispatcher.ContractName, rpc.Channel.DispatchRuntime.EndpointDispatcher.EndpointAddress })); } }