Hi Alex, I think this sort of thing is exactly how we intended for the task system to be used!
-Eric ----- Original Message ----- From: "Alex R." <[email protected]> To: "Brian Anderson" <[email protected]> Cc: [email protected] Sent: Friday, June 24, 2011 10:49:31 AM Subject: Re: [rust-dev] Notes on standard library requirements On Jun 23, 2011, at 2:51 PM, Brian Anderson wrote: * crypto * concurrency I saw these two listed and had a thought. Cryptography is generally computationally intensive, but it seems to me one could use the Rust task system to fix things. Suppose we have a server which must receive some data, decrypt it, and then process it: 1. Dedicated task receives data and spawns crypto task, providing it a channel. 2. Crypto task accepts ciphertext on its port, decrypts it, and sends cleartext out the provided channel. 3. Handler/processor task takes the cleartext and does whatever needs to be done. If the Rust scheduler is decent, this would mean further data could be received while the ciphertext is being decrypted, and data could be received and buffered without waiting for crypto to complete. Is that roughly feasible under the intended design of the tasks system? I'm not entirely sure of its details or intended functionality at this point. In any case, I may try writing some basic crypto code to get a feel for the language. - Alex Reinhart _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
