shimmeringbee / zda

Adapter to convert ZCL frames and queries into Shimmering Bee abstractions, written in Go.
Apache License 2.0
1 stars 2 forks source link

Review how event channel buffer works. #21

Closed pwood closed 4 months ago

pwood commented 8 months ago

In the original version of zda and the from-scratch version, we set the channel buffer to be events in the order of thousands. This is because deadlock can easily occur, which suggests a design flaw.

A unbuffered or buffered size of 1 (as per Uber style guide) does not work, as a call against the ZDA can often result in multiple messages being sent sync.

The from-scratch implementation just uses 0xffff, but we need to solve this properly.