Concurrency
Concurrency is the ability of a program to make progress on multiple tasks during overlapping time periods, whether by truly running them simultaneously or by interleaving their execution on a single processor.
167 resources across 4 libraries
Glossary Terms(13)
Erlang
Erlang is a functional, concurrent programming language designed for building massively fault-tolerant, distributed, real-time systems, originally created for…
Clojure
Clojure is a modern, functional dialect of Lisp that runs primarily on the Java Virtual Machine, emphasizing immutability and simplicity for building concurren…
Functional Programming
Functional programming is a programming paradigm that treats computation as the evaluation of pure functions, emphasizing immutability, avoidance of side effec…
Multithreading
Multithreading is a programming technique in which a single process runs multiple threads of execution concurrently, allowing different parts of a program to m…
Concurrency
Concurrency is the ability of a program to make progress on multiple tasks during overlapping time periods, whether by truly running them simultaneously or by…
Parallelism
Parallelism is the simultaneous execution of multiple computations at the exact same instant, typically achieved by distributing work across multiple CPU cores…
Asynchronous Programming
Asynchronous programming is a programming model that allows a program to start a long-running operation, such as a network request, and continue executing othe…
Event Loop
The event loop is the mechanism that allows a single-threaded runtime, like JavaScript's, to handle asynchronous operations by continuously checking a queue of…
Memory Leak
A memory leak is a defect in which a program allocates memory during execution but fails to release it after it is no longer needed, causing available memory t…
Just-In-Time (JIT) Compilation
Just-In-Time (JIT) compilation is a runtime technique that translates bytecode or intermediate code into native machine code while a program is executing, rath…
Process Scheduling
Process scheduling is the operating system mechanism that decides which of the many runnable processes or threads gets access to the CPU at any given moment, a…
Parallel Computing
Parallel computing is a model of computation in which multiple calculations or processes are carried out simultaneously, splitting a larger problem into smalle…
Immutability
Immutability is a property of a data value or object that cannot be modified after it is created; instead of changing an immutable value in place, operations p…
Study Notes(39)
Async Commands
How to correctly implement ICommand for asynchronous operations without deadlocks, unobserved exceptions, or double-execution, including the AsyncRelayCommand…
WCF Instancing and Concurrency
Understand the InstanceContextMode and ConcurrencyMode settings that control how many service instances WCF creates and how many threads can touch each one at…
Parallel LINQ (PLINQ)
Learn how PLINQ parallelizes LINQ to Objects queries across multiple cores using AsParallel, and when parallelism actually helps.
async/await Fundamentals
How async/await really works under the hood in .NET, the differences between Task, Task<T>, and ValueTask<T>, and how to avoid the classic deadlock trap.
Optimistic Concurrency Control
How EF Core detects and resolves concurrent edit conflicts using concurrency tokens and DbUpdateConcurrencyException, and how this compares to pessimistic lock…
Testing Async Code: Promises and async/await
Learn the correct patterns for testing promise-based and async/await code in Jest, and the pitfalls that let async bugs slip past a green test run.
Thread Groups
How JMeter Thread Groups control the number of virtual users, ramp-up time, and loop behavior that drive load against your system under test.
Parallel Workers and Sharding
How Playwright Test runs suites faster using isolated worker processes locally and distributes them across multiple CI machines with sharding.
Parallel Test Execution
Speed up Selenium suites by running multiple tests concurrently across threads, processes, or Grid nodes without sessions interfering with each other.
Scaling and Parallelism
Learn how Flink parallelizes work across task slots and how to scale jobs up or down without losing correctness.
Multi-Cluster Warehouses
Understand how multi-cluster warehouses handle high concurrency by automatically adding and removing compute clusters.
Parallel Programming with Coarrays
Learn how Fortran's native coarray feature enables SPMD parallel programming across multiple images without external message-passing libraries.
Future Methods and Async Apex
Learn how @future methods let Apex defer work to a separate asynchronous transaction with its own governor limits, and when to reach for them over other async…
Async/Await in VB.NET
Learn how the Async and Await keywords let VB.NET applications perform non-blocking I/O and long-running work without freezing the UI or wasting threads.
Grand Central Dispatch Basics
How GCD's queues, blocks, groups, and barriers provide a simple, C-based model for concurrency in Objective-C, and the deadlock traps to avoid.
Parallel Computing in Julia
An overview of Julia's parallelism options — multithreading with Threads.@threads, multiprocessing with Distributed.jl, and how to avoid data races.
Concurrency in D
Explore D's message-passing actors in std.concurrency, shared-memory safety via shared/synchronized/immutable, and declarative data parallelism with std.parall…
Futures and async/await
Learn how Dart represents asynchronous computations with Future objects and how async/await syntax lets you write non-blocking code that reads like synchronous…
Concurrency Primitives Compared
A side-by-side comparison of atoms, refs, agents, and core.async channels to help you choose the right Clojure concurrency primitive for each situation.
core.async Basics
core.async brings Go-style CSP concurrency to Clojure through channels and lightweight go blocks, decoupling producers and consumers.
Threading Macros
Learn how ->, ->>, some->, some->>, and as-> rewrite deeply nested Clojure expressions into readable, linear pipelines without changing runtime behavior.
Asynchronous Programming in F#
F#'s Async<'T> type and async { } computation expression provide a composable, cold-start model for asynchronous work that predates and interoperates with .NET…
Concurrency in Haskell
Learn how Haskell's lightweight threads, MVar, STM, and the async library make concurrent and parallel programming safer and more composable.
Futures and Concurrency
Scala's Future abstraction models asynchronous computations that run on an ExecutionContext, letting you compose non-blocking operations with map, flatMap, and…
Showing 24 of 39.
Cheat Sheets(38)
C# Cheat Sheet
Core C# syntax, LINQ queries, generic collections, async/await patterns, and object-oriented features for building .NET applications.
Go Cheat Sheet
Go syntax, goroutines, channels, error handling, and package structure for writing concurrent, statically typed programs.
Kotlin Cheat Sheet
Kotlin syntax, null safety, data classes, coroutines, and extension functions for concise, safe JVM development.
Dart Cheat Sheet
Dart syntax, sound null safety, async programming, and collection methods used to build Flutter applications.
Lua Cheat Sheet
Lua syntax, tables, metatables, closures, and coroutines for lightweight embedded scripting and game engine development.
Elixir Cheat Sheet
Elixir syntax, pattern matching, pipe operators, and OTP concurrency primitives for building fault-tolerant BEAM applications.
Clojure Cheat Sheet
Clojure syntax, immutable data structures, persistent collections, and functional idioms for modern concurrent JVM programming.
Python Multithreading & Multiprocessing Cheat Sheet
Concurrent Python covering threading basics, locks, executor pools, multiprocessing, and when to choose threads versus processes.
Python AsyncIO Cheat Sheet
Covers async/await syntax, creating and gathering concurrent tasks, synchronization primitives, and timeout/error handling patterns.
JavaScript Async/Await Cheat Sheet
Covers async function syntax, error handling with try/catch, and running promises sequentially versus concurrently with Promise combinators.
JavaScript Event Loop Cheat Sheet
Covers the call stack, the task and microtask queues, and how the event loop orders callbacks from Promises, setTimeout, and other async APIs.
JavaScript Error Handling Cheat Sheet
Covers try/catch/finally, custom Error subclasses, handling errors in promises and async/await, and the ES2022 error cause chain.
Java Streams API Cheat Sheet
Covers creating streams, intermediate operations like filter and map, terminal operations and collectors, and safe use of parallel streams.
Java Multithreading Cheat Sheet
Covers creating threads, ExecutorService thread pools, synchronization with locks and atomics, and composing async work with CompletableFuture.
C++ Multithreading Cheat Sheet
Covers C++ mutexes, lock guards, condition variables, atomics, and std::async/std::future for coordinating concurrent, thread-safe code.
C++ Concurrency (std::thread) Cheat Sheet
Covers creating and managing std::thread objects, passing arguments safely, join versus detach semantics, and thread lifecycle pitfalls.
C# Async/Await Cheat Sheet
Explains async/await in C#, Task combinators like WhenAll and WhenAny, cancellation tokens, exception handling, and common concurrency pitfalls to avoid.
Go Goroutines & Channels Cheat Sheet
Covers launching goroutines with the go keyword, sending and receiving on channels, buffered versus unbuffered channels, and select statements.
Go Concurrency Patterns Cheat Sheet
Covers goroutines, channels, select statements, sync primitives, and common concurrency patterns like worker pools and fan-in/fan-out in Go.
Rust Async Programming Cheat Sheet
Covers async/await syntax, Futures, the Tokio runtime, spawning tasks, and common concurrency primitives for asynchronous Rust code.
Kotlin Coroutines Cheat Sheet
Covers launching coroutines, suspend functions, coroutine builders, structured concurrency with scopes, and Flow for asynchronous Kotlin code.
Swift Concurrency (async/await) Cheat Sheet
Explains Swift's async/await, structured concurrency with Task and TaskGroup, actors, and async sequences for safe concurrent code.
Concurrency & Parallelism Concepts Cheat Sheet
Threads, processes, locks, race conditions, and deadlocks explained alongside async/await, goroutines, and channel-based concurrency patterns.
Dask Cheat Sheet
Dask reference covering parallel DataFrame and Array APIs, delayed task graphs, lazy evaluation, and the distributed scheduler client.
Showing 24 of 38.
Interview Questions(77)
What is a Transaction in a Database?
A transaction is a sequence of one or more database operations that executes as a single, indivisible unit of work — either every operation succeeds and commit…
What is the Read Uncommitted Isolation Level?
Read Uncommitted is the weakest transaction isolation level, allowing a transaction to see changes made by other transactions even before those changes are com…
What is the Read Committed Isolation Level?
Read Committed is an isolation level that guarantees a transaction only ever sees data that has been committed by other transactions, eliminating dirty reads w…
What is the Repeatable Read Isolation Level?
Repeatable Read is an isolation level that guarantees any row a transaction has read will return the exact same values if read again later in that same transac…
What is the Serializable Isolation Level?
Serializable is the strictest transaction isolation level, guaranteeing that the outcome of running transactions concurrently is identical to running them one…
What is a Phantom Read in Database Transactions?
A phantom read is a concurrency anomaly where a transaction re-runs a range query and finds a different set of rows than the first time, because another transa…
Dirty Read vs Non-Repeatable Read: What is the Difference?
A dirty read happens when a transaction reads data written by another transaction that has not yet committed, so it can read a value that later gets rolled bac…
What Are Lock-Free Data Structures?
A lock-free data structure guarantees system-wide progress without using mutexes, by relying on atomic hardware primitives like compare-and-swap (CAS) so that…
How Would You Design a Concurrent Hash Map?
A concurrent hash map achieves thread-safe reads and writes at scale by splitting the table into independently lockable segments (or per-bucket locks) instead…
Skip List vs Balanced Tree: When Would You Use Each?
A skip list achieves O(log n) expected search, insert, and delete using multiple layers of linked lists with randomized promotion instead of rebalancing, while…
Thread Safety in the Singleton Pattern
Thread safety in the Singleton pattern means guaranteeing that when multiple threads call the accessor concurrently before the instance exists, only one instan…
What is a Thread-Safe Singleton?
A thread-safe Singleton is an implementation of the Singleton pattern that guarantees exactly one instance is created and visible to every thread even when mul…
Difference Between Process and Thread
A process is an independent program in execution with its own private memory space, while a thread is a lighter unit of execution that lives inside a process a…
What is a Deadlock?
A deadlock is a situation where a set of processes are permanently blocked because each holds a resource the others need and is waiting for a resource another…
What is a Semaphore?
A semaphore is a synchronization primitive — an integer counter with atomic wait (P/down) and signal (V/up) operations — used to control access to shared resou…
Difference Between Mutex and Semaphore
A mutex is a locking primitive owned by exactly the thread that acquires it and enforces mutual exclusion over a single resource, while a semaphore is a counte…
What is a Page Fault?
A page fault is a hardware trap raised by the MMU when a running program accesses a virtual memory page that is not currently mapped to a physical frame, forci…
Preemptive vs Non-Preemptive Scheduling
Preemptive scheduling lets the OS forcibly suspend a running process to give the CPU to another, while non-preemptive scheduling requires the running process t…
What is a Race Condition?
A race condition occurs when two or more threads or processes access shared data concurrently and the final outcome depends on the unpredictable timing of thei…
What is the Critical Section Problem?
The critical section problem is the challenge of designing a protocol that lets multiple concurrent processes or threads take turns using a shared resource saf…
What is the Producer-Consumer Problem?
The producer-consumer problem is a classic synchronization challenge where one or more producer threads generate data into a shared, fixed-size buffer while on…
What Is Round Robin Scheduling?
Round robin scheduling is a preemptive CPU scheduling algorithm that gives every process a fixed time slice, called a quantum, in a cyclic order, so no single…
What Is a Monitor in OS?
A monitor is a high-level synchronization construct that bundles shared data with the procedures that operate on it, guaranteeing that only one thread can exec…
Deadlock vs Starvation: What Is the Difference?
Deadlock is a permanent standstill where a set of processes are each waiting on a resource held by another in the same set, so none of them can ever proceed wi…
Showing 24 of 77.