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
* exchange: remove one layer of boxing
We were previously forced to use a boxed trait object because we were
unable to name the type of the constructed closure.
This patch fixes it by introducing a custom `ParallelizationHasher`
trait that the `ParallelizationContractCore` expects with a blanket
implementation for all closures taking two arguments. This is to
maintain backwards compatibility with any code that passes a closure
directly to `ExchangeCore::new`.
Then a wrapper type `DataHasher<F>` is introduced that allows us to both
specialize the `ParallelizationHasher` implementation for single
argument closures and at the same time name the type which is what we
need to remove one layer of boxed trait objects.
Signed-off-by: Petros Angelatos <[email protected]>
* exchange: disallow exchanging based on time
Signed-off-by: Petros Angelatos <[email protected]>
0 commit comments