
Create and Join Threads with pthread_create
Start threads with pthread_create, wait for them with pthread_join and check the error codes correctly. Includes a complete C program and the mistakes to avoid.
Threads, atomics, memory models, lock-free structures, async runtimes and actor systems such as Erlang/OTP, and the races each one invites.

Start threads with pthread_create, wait for them with pthread_join and check the error codes correctly. Includes a complete C program and the mistakes to avoid.

A process owns an address space and a thread is a schedulable flow inside one. See what each shares and isolates on Linux, with fork and pthread_create code.

Bridge sync and async Rust with a Tokio Runtime and Handle::block_on, and avoid the nested-runtime panic from calling block_on inside a task.

Pick the right Tokio channel: mpsc for queues, oneshot for one reply, broadcast for fan-out and watch for the latest value, each with a working example.

Cancel async work in Tokio by dropping futures, racing them with select!, and signalling many tasks at once with tokio-util's CancellationToken.

Move blocking calls and heavy computation off Tokio's worker threads with spawn_blocking so one slow task cannot stall every other task on the runtime.

Build a TCP echo server with Tokio's TcpListener, spawn one task per connection and copy bytes back, then test it with a client over loopback.

Asynchronous I/O lets one thread wait on many sockets at once; an async runtime polls futures and sleeps in epoll until the kernel reports readiness.

Why threaded C and C++ programs stop scaling, and how to find and fix serial sections, lock contention, false sharing, bandwidth limits and bad work splits.

Learn OpenMP in C from the first parallel loop to tasks, SIMD, thread binding and GPU offload, with worked programs, exact output and common mistakes.

One guide to locking in C, C++ and Rust: mutexes, deadlock, condition variables, semaphores, barriers, rwlocks, spinlocks, futexes and debugging.

Learn threads from first principles in C with pthreads, C++ with std::thread and jthread, and Rust: create, join, share data, stop, name and debug them.
We send one email when a new post is published. No spam.