We are developing a Java application with multiple workflows. These threads will have to deliver a lot of calculation results to our user interface thread. The order of delivery of the results does not matter.
Right now, all threads are simply pushing the results onto the synchronized stack - but that means that each thread has to wait for the other threads before the results are delivered.
Is there a data structure that supports simultaneous insertions with each pad over time?
Thank,
Martin
ConcurrentLinkedQueue . , , , .
ArrayBlockingQueue , .
: , . Simultaneuos? (, ArrayBlockingQueue), . , Queue.
ArrayBlockingQueue
Queue
- , .
, ? , , ( ), , , - , , , .
, . , : ?
, , - , . , Swing, , , SwingWorker.
SwingWorker
java.util.concurrent.ConcurrentLinkedQueue, java.util.concurrent.ConcurrentHashMap java.util.concurrent.ConcurrentSkipListSet. , . ConcurrentSkipListSet, , , log (n) contains, add remove . , . "
java.util.concurrent.ConcurrentLinkedQueue
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentSkipListSet
ConcurrentSkipListSet
contains
add
remove
, , , , -
, , . , . ( , ), ( ).
, Lock.tryLock(). , . , .
Source: https://habr.com/ru/post/1751196/More articles:Makefile to compile .cpp and .h series in lib - c ++Устойчивость ранних выпусков продукта - project-managementDetecting if an item is selected in the list or not through jquery - jquerychrome / safari (webkit?) doesn't post values when submitted via Javascript.submit () - javascriptHow to allow StringTemplate.NET to load template files with the extension ".dwt"? - .nethow to send array values via url in php? - urlhow to get ram speed? - c #I do not understand the description of the bit field from the standard C - cAndroid: placing a view in an arbitrary place - androidPython: assigning an object using a list of variable arguments - pythonAll Articles