loading...

Discussion on: Is Encapsulation good for multithreading?

Collapse
ajanibilby profile image
Ajani James Bilby Author

Obviously avoiding shared memory via functional programming stops race conditions. However not every application can do that.

If you have a web server, every request could go to a different threads' schedule to quickly enable parallelism, however if you have any sessions that need to be accessed or updated as part of this request you will need to use shared memory.

I was trying to ask about methods for controlling shared memory, I guess I didn't word it very well.