locka99 / cpp-to-rust-book

Other
75 stars 24 forks source link

Multithreading #3

Open rNoz opened 6 years ago

rNoz commented 6 years ago

Hi,

I am enjoying your book, and I would like to see more in the section C++ compared with Rust (how Rust helps).

Can you elaborate on multithreading (pthreads and std::thread) and OpenMP? I think Rust lacks support for OpenMP, and that's the main reason why I didn't move to Rust. Parallelism is important for me.

Also, Null pointers sections is with a TODO. Are you still working in the section?

locka99 commented 6 years ago

Hi

I haven't added much to my book recently but in response to your email I've added some additional sections about multi-threading and Rust. It's not done yet but I hope it is some way to providing assistance. Mostly I've covered some general theory and C++. Despite having used multithreaded C++ I've never used OpenMP so I am just going to link out to their own site for now. I hope to add some detail on Rust about threading shortly.

Many thanks

Adam

On Fri, Jan 12, 2018 at 7:24 AM, rNoz notifications@github.com wrote:

Hi,

I am enjoying your book, and I would like to see more in the section C++ compared with Rust (how Rust helps).

Can you elaborate on multithreading (pthreads and std::thread) and OpenMP? I think Rust lacks support for OpenMP, and that's the main reason why I didn't move to Rust. Parallelism is important for me.

Also, Null pointers sections is with a TODO. Are you still working in the section?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/locka99/cpp-to-rust-book/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkil1QtvLigtV3pw_Dmi7xtErZ8K04oks5tJwi-gaJpZM4Rb5v3 .

rNoz commented 6 years ago

Thank you very much. Your work could convince me to try again Rust :P I have seen that people use rayon to do multithreading, but it will be great to know how to deal without external crates, to know the basic API/workflow in Rust like what we do in C++ with std (thread, mutex and cond_var). Thanks in advance.