3 ms·
I did end up using a `chan chan` when implementing a threadpool: https://github.com/PeerDB-io/peerdb/pull/1613/files#diff-4271e6cae9f94319668184d987f2869fc2abaf
by __s 2y ago
I did end up using a `chan chan` when implementing a threadpool: https://github.com/PeerDB-io/peerdb/pull/1613/files#diff-4271e6cae9f94319668184d987f2869fc2abafe2b5a7067d14faf852826f24e7 https://github.com/PeerDB-io/peerdb/pull/1613/files#diff-427...
The inner channel represents a future, while the outer channel is fed by threadpool workers to a finalization reader. This way the ordering doesn't get corrupted by parallelism