Does anyone know how to have a thread randomly decide if it wants to do blocking or non-blocking mode with direct communication? I am using a bounded buffer with size of 5. I have the non-blocking mode right but I am not sure how exactly to change it to accommodate for blocking mode. I am not very proficient with Java. I am actually just learning. Does anyone also know how to do blocking direct communication with only 1 producer and 1 consumer used for blocking and non-blocking? Thanks for any help anyone may have.
tat2dlady 0 Light Poster
freesoft_2000 9 Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.