コード例 #1
0
ファイル: ClientConductor.cs プロジェクト: bpb1/Aeron.NET
        internal void ReleasePublication(ExclusivePublication publication)
        {
            VerifyActive();

            ExclusivePublication publicationToRemove;

            _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove);

            if (publication == publicationToRemove)
            {
                LingerResource(publication.ManagedResource());
                AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null);
            }
        }
コード例 #2
0
        internal void ReleasePublication(ExclusivePublication publication)
        {
            if (_isClosed)
            {
                throw new InvalidOperationException("Aeron client is closed");
            }

            ExclusivePublication publicationToRemove;

            _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove);

            if (publication == publicationToRemove)
            {
                LingerResource(publication.ManagedResource());
                AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null);
            }
        }