This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"sync" | |
) | |
type fanOutResult[K any, R any] struct { | |
Key K | |
Result R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::marker::PhantomData; | |
pub enum TopK<I, E, K, F, const N: usize> { | |
// this TopK has just been created and no data has been computed | |
// this is the initial state | |
Prepared { | |
itr: I, | |
f: F, | |
_k: PhantomData<K>, | |
}, |
OlderNewer