Rust version with atomics works
Do more additions!
add pthread spinlock