Parallel builds in CI/CD are nice and dandy, but one has to remember that having a couple dozen simultaneous jobs update the same file at the same time can lead to undesirable side effects.
Parallel builds in CI/CD are nice and dandy, but one has to remember that having a couple dozen simultaneous jobs update the same file at the same time can lead to undesirable side effects.
getenv() + putenv() + setenv() 的 thread-safe 問題
在「Improving Steam Client Stability on Linux (ttimo.typepad.com)」這邊看到的,原文在「Improving Steam Client stability on Linux: setenv and multit
#Computer #Linux #Murmuring #OS #Programming #Security #Software #env #getenv #glibc #linux #memory #multihtreading #putenv #safe #safety #setenv #thread #threadsafe #threading #threads
在「Improving Steam Client Stability on Linux (ttimo.typepad.com)」這邊看到的,原文在「Improving Steam Client stability on Linux: setenv and multithreaded environments」這邊。 裡面提到了 getenv() + putenv() + setenv() 的設計問題使得他很難 thread-safe 而造成 Linux 版的 Steam client 容易 crash,從功能上大概猜得到原因,畢竟是對一塊 global variable 操作 + 提供 pointer 讓後續的程式操...
And what happened? After I had it all working, and I wanted to say, OK, let's use multitasking to share out all the work amongst the available CPU cores?
Remember, I'd put zero thought into trying to make the code #ThreadSafe, I was just writing single-threaded game play, but I *was* using #immutable vals instead of mutable vars.
12/
"Thread Safety In C++ And Rust", Josh Haberman (https://blog.reverberate.org/2021/12/18/thread-safety-cpp-rust.html).
On HN: https://news.ycombinator.com/item?id=29608552
#Concurrency #Parallelism #Threads #Multithreading #Rust #CPlusPlus #ThreadSafe #ThreadCompatible #Mutability #Mutex #MemorySafety #DataRaces