Java ArrayBlockingQueue for implementing muliple producers and multiple consumer -
say in system have multiple producer threads , multiple consumer threads , planning use arrayblockingqueue shared resources. see implementation of arrayblockingqueue when insert() call notempty.signal instead of notempty.signalall. therefore, wonder wake consumer threads waiting elements, or wake 1 consumer thread? if wakes 1 consumer thread, can use implement multiple consumer thread in app?
Comments
Post a Comment