privacy-scaling-explorations / mpz

Multi-party computation libraries written in Rust 🦀
201 stars 44 forks source link

feat(mpz-common): multi-threaded executor #136

Closed sinui0 closed 5 months ago

sinui0 commented 5 months ago

This PR implements a multi-threaded executor which utilizes a multiplexed connection to support forking.

It is currently limited to executing 2 futures concurrently, but we can expand this as needed.

EDIT: I've gone all the way and added full forking support which can be accessed via the queue method on Context. This can be used to distribute an arbitrary number of tasks across a configurable number of logical threads.

sinui0 commented 5 months ago

I'm going to just remove this queue stuff and stick with the other changes. Will proceed with merge as scope will be a subset. Will open another PR if/when we need this functionality

sinui0 commented 5 months ago

Sorry for changing scope after review. I also identified a bug which I've fixed.