본문 바로가기 메뉴 바로가기

두찡의 일상

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

두찡의 일상

검색하기 폼
  • 분류 전체보기 (145)
    • 개발 (121)
      • 알고리즘 (6)
      • 일상 (52)
      • 병렬프로그래밍 (8)
      • 도트도전기 (12)
      • 코드로 알아보는 ARM 리눅스 커널 TIL (33)
      • arm64 linux 6 분석 (10)
    • 게임근황 (12)
    • 개발 외 일상 (11)
      • 세르비아 출장 (9)
  • 방명록

shared_ptr (1)
c++ shared_ptr not thread-safe

Sample Error Code : https://wandbox.org/permlink/oAXbYnkKE5BR7Wig [Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ wandbox.org #include #include #include std::shared_ptr g; void read_g() { std::shared_ptr x; long sum = 0; for (int i = 0; i < 1000 * 1000; ++i) { x = g; sum += *x; } printf("sum = %ld\n", sum); } void write_g() { for (int i = 0; i < 1000 * 1000; ++i) { auto n = std::make_shared(42); g = n; } } int main()..

개발/일상 2020. 6. 27. 18:09
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 링크드인
  • 깃허브
TAG
  • 봄날에 스케치
  • 우리는 vr핏이라고 부릅니다
  • 코어 남기기
  • Golang
  • Visual Studio
  • SuffixArray
  • vr핏
  • boost
  • 클래스 맴버 변수 출력하기
  • C++
  • 잘못된 빨간줄
  • hole-punching
  • ad skip
  • mysql
  • shared_from_this
  • red underline
  • Quest2
  • 영상 픽셀화 하기
  • print shared_ptr class member variable
  • 면접
  • chrome-extension
  • Reciprocal n-body Collision Avoidance
  • 카카오
  • Obstacle Avoidance
  • vrpit
  • cockroach db
  • RVO
  • 에러 위치 찾기
  • set value
  • it's called a vrpit
more
«   2026/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바