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

두찡의 일상

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

두찡의 일상

검색하기 폼
  • 분류 전체보기 (122) N
    • 개발 (112) N
      • 알고리즘 (6)
      • 일상 (50)
      • 병렬프로그래밍 (8)
      • 도트도전기 (12)
      • 코드로 알아보는 ARM 리눅스 커널 TIL (33)
      • arm64 linux 6 분석 (3) N
    • 게임근황 (6)
    • 개발 외 일상 (2)
  • 방명록

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
  • 봄날에 스케치
  • 잘못된 빨간줄
  • Visual Studio
  • Quest2
  • 클래스 맴버 변수 출력하기
  • mysql
  • hole-punching
  • cockroach db
  • vr핏
  • 우리는 vr핏이라고 부릅니다
  • Obstacle Avoidance
  • chrome-extension
  • vrpit
  • Golang
  • 에러 위치 찾기
  • 면접
  • 카카오
  • red underline
  • print shared_ptr class member variable
  • C++
  • ad skip
  • boost
  • SuffixArray
  • 코어 남기기
  • Reciprocal n-body Collision Avoidance
  • set value
  • 영상 픽셀화 하기
  • RVO
  • it's called a vrpit
  • shared_from_this
more
«   2025/05   »
일 월 화 수 목 금 토
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 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바