Java內存模型FAQ(二) 其他語言,像C++,也有內存模型嗎?

其他語言,像C++,也有內存模型嗎?

原文地址:http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html

大部分其他的語言,像C和C++,都沒有被設計成直接支持多線程。這些語言對於發生在編譯器和處理器平臺架構的重排序行爲的保護機制會嚴重的依賴於程序中所使用的線程庫(例如pthreads),編譯器,以及代碼所運行的平臺所提供的保障。

原文:-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Most other programming languages, such as C and C++, were not designed with direct support for multithreading. The protections that these languages offer against the kinds of reorderings that take place in compilers and architectures are heavily dependent on the guarantees provided by the threading libraries used (such as pthreads), the compiler used, and the platform on which the code is run.  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章