• Title/Summary/Keyword: C++11 shared_ptr

Search Result 1, Processing Time 0.017 seconds

Implementation of Lock-Free shared_ptr and weak_ptr for C++11 multi-thread programming (C++11 멀티스레드 프로그래밍을 위한 Lock-Free shared_ptr와 weak_ptr의 구현)

  • Ku, TaeKyun;Jung, NaiHoon
    • Journal of Korea Game Society
    • /
    • v.21 no.1
    • /
    • pp.55-66
    • /
    • 2021
  • Multi-thread programming is essential in high performance game programming. But, the widely used C++11 shared_ptr and weak_ptr have malfunction and performance problems in multi-thread environments. In this paper, we propose Lock-Free shared_ptr and weak_ptr, which have higher performance than current error preventing methods. These use a non-blocking algorithm to prevent data race in multi-thread environments. As a result of experimenting in an 8 thread environment, performance has improved up to 7424% in a situation where competition between threads is low, and 3767% in high competition.