Was this page helpful?

BlockingQueue<T> Class

    Table of Contents
    public class BlockingQueue<T>
    Namespace: MindTouch.Collections
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • BlockingQueue<T>
    Implements:
    Provides a thread-safe queue that blocks on queue and dequeue operations under lock contention or when no items are available.

    Generic Parameters

    Parameter T

    Type of the data items in the queue
    Constraints:
    none

    Members

    Constructors

    Visibility Description
    Public BlockingQueue()

    Properties

    Visibility Description
    Public IsClosed True when the queue has been closed and can no longer accept new items, False otherwise.
    Public Count Total number of items currently in the queue.

    Methods

    Visibility Description
    Public Dequeue() Blocking dequeue operation. Will not return until an item is available.
    Public TryDequeue(TimeSpan timeout, out T item) Attempt to dequeue an item from the queue.
    Public Enqueue(T data) Enqueue a new item into the queue.
    Public Close() Close the queue and stop it from accepting more items.
    Public ToString() (Inherited from Object)
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by