Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did end up using a `chan chan` when implementing a threadpool: 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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: