The thread is that of the system. Why has no scheduler: the ceiling stays that of C. The brace that launches waits: the author writes no handle. The channel copies or moves, so that a pointer does not enter another thread’s arena.
A thread is launched with
thread call. The thread has its stack and itsarena thread, which dies when its call returns. No goroutine. No growable stack. No scheduling runtime.
The brace that contains the
threadwaits for it. Anif, anelse, anarena, aselectarm and the body of a function are such braces. The body of aforis not.
chan[T](n)opensnslots. The queue does not grow.nzero is a rendezvous: the value is copied, then both continue.
Copying is
la garde ne se copie pas.=andreturnmove it. The source becomes empty. The compiler closes it at the end of the name that holds it. The author does not writeclose.
c.send(v)returnserror. A full queue blocks.nilmeansventered.c.receive()returns(T, error). An empty queue blocks.
p := freeze(x)movesx.freezemarks the storage. A write that reaches this storage isfreeze.
arena shared name { }dies at the brace, after waiting for the threads launched inside.name.makeandname.appendstay on the thread that opened the block.
selectreturns anerror. The first ready arm, in text order, runs. Nodefault.
Diagnostic. thread attend un appel — thread without a call. la garde ne se copie pas — copying a channel. garde déplacée — sending or receiving on an empty name. le canal reste un nom — a channel in a field, a slice or a map. le pointeur ne sort pas — an argument that does not survive the call. arène partagée — passing a shared arena to a thread. select attend un bras — select without an arm. case hors select — case outside select. alias — a write to a freeze storage that still has a mutable alias.
Not in this version. entree[T](n) and sortie[T](n). The goroutine. The growable stack. The scheduler.