adamgreig / sdr-rs

SDR DSP for Rust
25 stars 9 forks source link

Add chain! macro #21

Closed adamgreig closed 9 years ago

adamgreig commented 9 years ago

Replace:

let x = bla1.process(&x);
let x = bla2.process(&x);
let x = bla3.process(&x);

with something like:

let x = chain!(x, bla1.process, bla2.process, bla3.process);

Bonus feature: chain_threaded! that runs each block in its own thread in some way that is actually useful.

adamgreig commented 9 years ago

Added in ffdabc233a28b128447b0333a8a70674d4cb8848. Threading will need further thought.