India’s Best Job Seekers and Training Platform Forums Data Structure Implemented a bounded queue …

  • Implemented a bounded queue …

     Akash  updated 11 months, 3 weeks ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    Implemented a bounded queue:

    Read:

    If queue is empty, wait till it can return a value with time out

    If another thread is reading from the queue then wait till that thread is done

    Remove the first element from the queue and return it

    Do not block if a thread is writing into the queue

    Write:

    If queue is full, wait till one value is read with time out

    If another thread is writing to the queue, wait till that thread is done

    Write the element at the end of the queue

    Do not block if a thread is reading from the queue.

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close