Patent ID: 11886343
Assignee: DREAMWORKS ANIMATION LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 17:
18. A method for reading data from a ring buffer by a computing thread, the method comprising:
determining whether the ring buffer is empty, based on an atomic variable that represents a number of stored elements in the ring buffer;
in response to determining that the ring buffer is not empty:
clearing an element of the ring buffer storing the data, wherein clearing the element comprises decrementing a size variable corresponding to the number of stored elements in the ring buffer;
identifying a portion of the ring buffer from which the data is to be read;
determining whether a state of the portion of the ring buffer is in change by at least one other computing thread; and
in response to determining that the state of the portion is not in change by the at least one other computing thread:
marking the state of the portion of the ring buffer as being in change by the computing thread;
reading the data from the portion of the ring buffer; and
destroying the data in the portion of the ring buffer.