×

Multi-lane concurrent bag for facilitating inter-thread communication

  • US 8,689,237 B2
  • Filed: 09/22/2011
  • Issued: 04/01/2014
  • Est. Priority Date: 09/22/2011
  • Status: Active Grant
First Claim
Patent Images

1. A non-transient, computer-readable storage medium storing program instruction executable by a processor to implement:

  • a concurrent multi-lane bag data structure comprising;

    a plurality of independently-accessible concurrent intermediaries configured to store data elements;

    an insert function executable to insert a given data element into the bag by selecting a successive one of the intermediaries, at least in part, by atomically reading and modifying an indication of the most recent intermediary selected by an execution of the insert function, and inserting the data element into the selected intermediary; and

    a consume function executable to consume a data element from the bag by choosing a successive one of the intermediaries, at least in part, by atomically reading and modifying an indication of the most recent intermediary chosen by an execution of the consume function, and removing and returning the data element from the chosen intermediary;

    wherein;

    the bag guarantees that an execution of the consume function consumes a data element if the bag is non-empty; and

    the bag enables multiple threads to execute the insert function or the consume function concurrently.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×