Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Checking if thread is still running  (Read 2870 times)

0 Members and 1 Guest are viewing this topic.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Checking if thread is still running
« on: October 25, 2013, 12:07:14 pm »
Is there anyway to check if a thread is still alive in SFML?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Checking if thread is still running
« Reply #1 on: October 25, 2013, 12:08:54 pm »
Not with SFML function, but you can simply use a std::atomic<bool> or std::atomic_flag (C++11 features) and set it once the thread finishes. ;)
« Last Edit: October 25, 2013, 12:11:58 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything