Closed synzhu closed 3 years ago
Thanks :). Can you add a test showing that this works? It can also serve as a useful example for people who want to leverage this option.
Thanks :). Can you add a test showing that this works? It can also serve as a useful example for people who want to leverage this option.
@aschmahmann Sure, I can try, I thought about it but originally I didn't see any way to do black box testing of this functionality since it would have to somehow rely on timing. But I can probably do some sort of whitebox test that asserts on the order of PeerTasks popped from the PeerTaskQueue
This is the second part of https://github.com/ipfs/go-libipfs/issues/82.
It introduces a
TaskComparator
which can be configured to implement custom task prioritization logic.