Fading Coder

One Final Commit for the Last Sprint

Understanding Go's atomic.Value Implementation

Interface Representation in Go In Go, interface are represented as a combination of type and data pointers: <code>package main import ( "fmt" "unsafe" ) type CustomType struct { num int64 } type InterfaceRep struct { typePtr unsafe.Pointer dataPtr unsafe.Pointer } func insp...

Atomicity Issues in Multithreading and Their Solutions

Atomicity An atomic operation is one that is executed as a single, indivisible unit. The operation either completes entirely or not at all. Atomicity Issues in Multithreading Consider a scenario where we want 100 threads to each deliver 100 flowers to Xiao Ha, but we find that the total is less than...