You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix the issue of gather not working because it cannot send a channel over a channel on the op. The poroblem exists because the channel is strongly typed to the item value T, meaning that only instances of T can be sent.
Of(op).SendContext(ctx, gather) // gather is the wrong type
It may be that we revert the T on Item back to interface{}, so that we can send the channel of T through the op channel (operator[T]). This would then require on both ends of the channel a type check to convert the value to the required type.
We probably need to create a new Item method: SendChContext that is specialised for sending a channel over an op channel. We probably need to combine this with a new op to compement Of, perhaps Ch (to represent a channel). If we had Ch(op), then we could still use the name SendContext, rather than SendChContext. Also, we might have to create a new member on Item, that contains the channel/op of T, that can be used by Ch. If we can find the correct solution using Ch, we can still keep Item.V as a strongly typed value.
Actually, we may be able to fix other problems by stipulating the T is not any, but 'constraints.Ordered'
The text was updated successfully, but these errors were encountered:
fix the issue of gather not working because it cannot send a channel over a channel on the op. The poroblem exists because the channel is strongly typed to the item value T, meaning that only instances of T can be sent.
It may be that we revert the T on Item back to interface{}, so that we can send the channel of T through the op channel (operator[T]). This would then require on both ends of the channel a type check to convert the value to the required type.
We probably need to create a new Item method: SendChContext that is specialised for sending a channel over an op channel. We probably need to combine this with a new op to compement Of, perhaps Ch (to represent a channel). If we had Ch(op), then we could still use the name SendContext, rather than SendChContext. Also, we might have to create a new member on Item, that contains the channel/op of T, that can be used by Ch. If we can find the correct solution using Ch, we can still keep Item.V as a strongly typed value.
Actually, we may be able to fix other problems by stipulating the T is not any, but 'constraints.Ordered'
The text was updated successfully, but these errors were encountered: