Being Java programmer.
Being Java programmer.
Ganish Patil wrote:Oh my god, I just need to learn how to post , edited so many times. doesn't it look weird?. Anyway need guidance for above code please.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
yes there are 3 teachers. What does Piles means ? I didn't get that.Winston Gutkowski wrote:Unless I'm wrong, you have 3 Teachers
Ohh ! yes yes I can use two Stack<Paper> one for checked and other for unchecked papers. There is no need of timing but just to see total work completion time taken when three teachers work simultaneously and when only one or two works (By not starting third teacher thread) and also how it pauses to know all this I used there.Winston Gutkowski wrote:(which sound suspiciously like Stack<Paper>s to me): 'unchecked' and 'checked'; so the only things that need to be synchronised are the push() and pop() methods for your Piles.
Being Java programmer.
Being Java programmer.
Ganish Patil wrote:But I didn't get the difference between join() and wait()...
Suppose in the above example. I want to free only teacherOne for 5 seconds once 30 papers are checked...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
hmm I think so,Winston Gutkowski wrote:You still seem to be hung up on the mechanics of all this, instead of concentrating on the problem
yes I'll make changes in the same above code, will use that Pile class. Thank you so much for your help. I'll post once I make changes in it.See if you can work out what I'm trying to do, and come back if you have any questions.
Being Java programmer.
Ganish Patil wrote:yes I'll make changes in the same above code, will use that Pile class.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Being Java programmer.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |