Featured image of post [Concurrency 07] C++20 Barrier/Latch 활용

[Concurrency 07] C++20 Barrier/Latch 활용

C++20 std::barrier(재사용 가능한 동기 지점)와 std::latch(1회성 카운트다운)의 내부 동작과 비용을 다룹니다. phase·completion function 설계, mutex/condition_variable과의 선택 기준, 완화된 표준 보장(P2588R3)까지 정리합니다.

Featured image of post [Concurrency 07] C++26 std::execution: Senders/Receivers 실전

[Concurrency 07] C++26 std::execution: Senders/Receivers 실전

C++26에 확정된 std::execution(P2300)의 센더·리시버·스케줄러 합성 모델을 stdexec 레퍼런스 구현으로 실습하고, 완료 신호 3채널·구조적 동시성·Citadel Securities 프로덕션 도입 사례를 다룹니다.

Featured image of post [Concurrency 07] Condition Variable 성능 패턴

[Concurrency 07] Condition Variable 성능 패턴

condition_variable의 spurious wakeup과 thundering herd 비용을 Mesa semantics 기원부터 다루고, predicate 루프·notify 선택·wait morphing으로 대기 비용을 줄이는 법과 atomic::wait/notify 대안을 비교합니다.

Featured image of post [Concurrency 07] Executors 기초

[Concurrency 07] Executors 기초

C++ 표준화가 콜백형 executor에서 scheduler·sender/receiver 모델로 옮겨간 과정과, 실행 컨텍스트와 스케줄링을 분리하는 최소 구조를 다룹니다. P0443의 한계와 C++26 채택 배경을 정리합니다.

Featured image of post [Concurrency 07] False Sharing 탐지와 회피

[Concurrency 07] False Sharing 탐지와 회피

false sharing이 캐시 일관성 프로토콜을 통해 지연시간을 갉아먹는 원리를 설명하고, perf c2c로 실제 코드에서 공유 캐시 라인을 찾아낸 뒤 alignas(hardware_destructive_interference_size)로 회피하는 실전 절차를 다룹니다.

Featured image of post [Concurrency 07] Hazard Pointers·RCU

[Concurrency 07] Hazard Pointers·RCU

C++26에 채택된 hazard_pointer(P2530)·rcu(P2545)의 안전한 메모리 회수 메커니즘과 grace period 개념을 다루고, 2026년 7월 기준 GCC libstdc++·Clang libc++·MSVC STL의 구현 현황과 도입 판단 기준을 정리합니다.

Featured image of post [Concurrency 07] Lock 선택 기준

[Concurrency 07] Lock 선택 기준

mutex·spinlock·shared_mutex·futex 기반 프리미티브 중 워크로드에 맞는 락을 고르는 기준을 다룹니다. 임계 구역 길이·경합도·읽기쓰기 비율별 판단표와 adaptive mutex, SRWLOCK, os_unfair_lock의 구현 차이, 흔한 선택 오류를 정리합니다.

Featured image of post [Concurrency 07] Lock-free 설계 기초와 적용 판단

[Concurrency 07] Lock-free 설계 기초와 적용 판단

CAS 루프와 ABA 문제로 lock-free 설계의 기본 메커니즘을 설명하고, 언제 lock-free가 실제로 유효한지 판단하는 기준을 정리합니다. Intel TSX/HTM이 2021년 마이크로코드로 사실상 폐기된 배경도 함께 다룹니다.

Featured image of post [Concurrency 07] Lock-free 자료구조 구현

[Concurrency 07] Lock-free 자료구조 구현

Michael-Scott 큐, Treiber 스택, split-ordered list 해시맵의 CAS 재시도·헬핑 메커니즘과 메모리 회수 문제를 컴파일 가능한 C++20 코드와 ThreadSanitizer 검증 절차로 다룹니다.

Featured image of post [Concurrency 07] Seqlock 패턴

[Concurrency 07] Seqlock 패턴

리더가 락 없이 읽고 시퀀스 카운터로 일관성을 검증하는 Seqlock 패턴을 다룹니다. 카운터 설계, 짝수/홀수 판정 원리, 구현 함정, ThreadSanitizer가 이 패턴에서 오탐·미탐을 동시에 낼 수 있는 이유를 정리합니다.