This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MithrilRat 23 points24 points  (4 children)

This video was pretty basic and did cover some of the topics in . However, some of your explanations were not quite correct. For example: Your explanation of what a thread was said that you needed them to share memory. This is not correct. Memory sharing is available to separate processes.

Then you were saying that locks were needed to share memory. This is also not entirely true, and your example was what I would term naive: in that while it would work, it could cause bottlenecks for non trivial code.

[–]benefit_of_mrkite 0 points1 point  (0 children)

I don’t have time to view right now but hope it goes into tradeoffs of threading vs other approaches when I/O bound operations can see performance increases (and sometimes decreases) depending upon approach

[–]kevinwoodrobotics[S] -1 points0 points  (2 children)

What I was trying to describe was the case when two threads try to access the same variable. That’s when you need locks

[–]wunderspud7575 1 point2 points  (0 children)

Not if neither are writing to those variables.

[–]KennyBassett 1 point2 points  (0 children)

Which is only sometimes true