Threads in Rust

  1. Threads in Rust
  2. Available cores
  3. Simple thread (with fake work)
  4. Simple thread
  5. Simple thread with join
  6. Show that threads work in parallel
  7. Return value from thread
  8. Handle panic! in threads
  9. Threads polling the substhreads
  10. Threads with messages
  11. Two threads sending messages
  12. Testing speed improvements with threads
  13. Save many files (both CPU and IO intensive)
  14. Rust threads read-only access to shared variables
  15. Shared read-only variable with numeric value
  16. Shared read-only variable with string value
  17. Shared read-only variable with string value with Arc
  18. Pass reference of read-only vector to thread
  19. Pass reference of read-only vector to thread improved
  20. Process read-only string slices in parallel
  21. Filling the memory showing that Arc works
  22. Pass and return ownership
  23. Thread scope
  24. chdir in threads
  25. Environment variables in threads
  26. Counter in a loop in the same process and thread
  27. Mutex - without threads
  28. Lock with Mutex
  29. Counter with threads (shared variable) using Mutex
  30. Counter with threads (local counting)
  31. Counter with message passing
  32. thread-local variables
  33. Exercise: character counting
  34. Exercise: word count
  35. Exercise: count characters, words
  36. Exercise: run several functions on the same text
  37. Exercise: Download many files in threads
  38. Solution: count characters, words
  39. Solution: run several functions on the same text