Concurrency
Let's Learn Go -- (5) Goroutine and Channel
· β˜• 7 min read
1. The Concurrency Model in Go 1.1 The Communication Model: CSP CSP stands for Communicating Sequential Process, a model for concurrent communication. A Process can use many Channels, and a Channel does not care who is using it β€” it is only responsible for sending and receiving data. In the Go community there is a very famous maxim: do not communicate by sharing memory; instead, share memory by communicating.

How to Ensure Concurrent Data Consistency in Django
· β˜• 2 min read
The first part mainly covers optimistic and pessimistic locking. Locking guarantees data consistency under concurrency at the database level. Understanding locks helps you understand concurrency solutions. The second part mainly covers how to guarantee data consistency in concurrent scenarios within Django. 1. About Locks 1.1 Optimistic Locking The starting point

Processes, Threads, and Coroutines in Python
· β˜• 5 min read
1. Processes A process is an instance of a running program, and it is the most basic unit by which the kernel allocates resources. A process has its own independent heap and stack, its own address space, and its own resource handles. Processes are scheduled by the OS, the scheduling