65185c7996f6082bfd0aaeb80871af17c12852a1
Saving for reference more than anything. The threads take ownership of the data (the closures do, but whatever). Moving the return channel out of the dispatcher means the dispatcher can't be moved into the feeder thread. I see a few solutions from here: 1. Proxy the return channel with another channel. Give the whole dispatcher to the feeder thread and hook up another output channel. Have the feeder unload the return and pass it through. 2. Rewrite the dispatcher constructor to pass a tuple of the dispatcher minus it's return channel, and the return channel now as a separate object. This could let them have independent lifetimes and then I can pass them around like I'm trying to do. 3. Have main do all the job feeding, result unloading, and recompositing. Don't have a feeder and collector thread, and just have main bounce between loading a few, and unloading a few.
Description
Languages
Rust
100%