Exemple #1
0
            internal void ReleaseSyncChannel(DUCE.Channel channel)
            { 
                Invariant.Assert(_freeSyncChannels != null);
 
                // 
                // A decision needs to be made whether or not we're interested
                // in re-using this channel later. For now, store up to three 
                // synchronous channel in the queue.
                //

                if (_freeSyncChannels.Count <= 3) 
                {
                    _freeSyncChannels.Enqueue(channel); 
                } 
                else
                { 
                    channel.Close();
                }

            }