Npgsql.NpgsqlConnector.BlockNotificationThread C# (CSharp) Method

BlockNotificationThread() private method

private BlockNotificationThread ( ) : NotificationThreadBlock
return NotificationThreadBlock
        internal NotificationThreadBlock BlockNotificationThread()
        {
            return new NotificationThreadBlock(this);
        }

Usage Example

示例#1
0
        /// <summary>
        /// Called after writing all data to CopyStream to successfully complete this copy operation.
        /// </summary>
        public void End()
        {
            if (_context != null)
            {
                try
                {
                    if (IsActive)
                    {
                        // Stop Notification thread so we can process this message.
                        // See bug 1010796

                        using (_context.BlockNotificationThread())

                        {
                            _context.CurrentState.SendCopyDone(_context);
                        }
                    }
                }
                finally
                {
                    if (_context.Mediator.CopyStream == _copyStream)
                    {
                        _context.Mediator.CopyStream = null;
                    }
                    if (_disposeCopyStream)
                    {
                        _copyStream = null;
                    }
                }
            }
        }
All Usage Examples Of Npgsql.NpgsqlConnector::BlockNotificationThread