`Async::Queue#signal` does not default `value` to `nil`
#276 introduced a breaking change to the public interface of Queue. Prior to #276 #signal was inherited from Notification where value is defaulted to nil if it is not provided.
The new implementation of Queue#signal does not provide a default. Our implementation calls this method without an argument, and so now we are getting the following exception:
ArgumentError wrong number of arguments (given 0, expected 1)
Apologies for this breaking change.
Considering your investigation, do you think we should restore the default behaviour? If so, do you mind submitting a PR?
I can make a PR, but it feels to me like the semantics of the #signal method have fundamentally changed, so I'm not sure I fully understand the expected behaviour. Before, a Queue was a Notification, but now it wraps a Notification (@available). The new #signal implementation is basically an alias for #enqueue, and there is no way to directly signal to the wrapped Notification without the byproduct of adding an item to the queue. If I just default the value to nil then a nil item will be added to the queue, which I don't think it appropriate. It's possible that our implementation is now outdated, and we don't need to call #signal anymore to achieve the same result.
For context our use of #signal is related to https://github.com/socketry/async/issues/176, which looks to have been resolved by #187. I will test whether the issue still exists in the absence of the #signal call, and if not, I will just remove it from our implementation.
Confirmed, it looks like v2.3.0 which includes the changes in #187 fixed our issue, and we just haven't checked since then. So we can just remove the #signal call completely. I'm not sure what this means for the breaking change, but hopefully no-one else is using it in the same way we were.
Awesome, let's keep this open and when I have time to review it in detail, I'll make a decision.
I'm okay with following the same contract as Notification#signal.