zsmartsystems / com.zsmartsystems.zigbee

ZigBee Cluster Library Java framework supporting multiple dongles
Eclipse Public License 1.0
138 stars 87 forks source link

Rework queue management for concurrency #1381

Closed ViToni closed 1 year ago

ViToni commented 1 year ago

Changes the transaction queue handling for hopefully better concurrency. Instead of iteration over transaction queues, each with their own order, there is now a queue of queues. Each time a transaction is submitted for sending, its queue is added to the main queue resulting into an ordered sequence of transactions, indirectly represented by the queued transaction queues. For each entry in the main queue only one transaction is processed. Sleepy queues and queues with a release time in the future will be readded to the main queue.

This should fix #1363 and #1291.

ViToni commented 1 year ago

@cdjackson Would you mind taking a look at this one?

cdjackson commented 1 year ago

Thanks @ViToni - I think this looks good.