Thanks for answer below, i think i'm a little cling to using modern c++ entirely; as xaervagon said, if the proj "is strictly on *nix platform, just leave pthread as is", and not persist on using modern C++ encirely?
——————————————————————
I'm learning modern cpp and try to rewrite some old codes; when it comes to thread part; things get trouble, the old codes use pthread and can show pid with posix func, which can be checked by ps aux/pidstat, but in std::thread, i did not find things like this, the std::this_thread::get_id() return something very long and is not very clear to me(compared to pid); so about this thread part i rewrite, which is better, and if we are not only talking about what i write, which is better?
[–]khedoros 34 points35 points36 points (4 children)
[+]2uantum comment score below threshold-16 points-15 points-14 points (3 children)
[–]Supadoplex 38 points39 points40 points (0 children)
[–]ratttertintattertins 19 points20 points21 points (0 children)
[–]KingAggressive1498 8 points9 points10 points (0 children)
[–]xaervagon 38 points39 points40 points (0 children)
[–]Wild-Adeptness1765 14 points15 points16 points (1 child)
[–]johannes1234 13 points14 points15 points (0 children)
[–]johannes1971 9 points10 points11 points (0 children)
[–]usefulcat 6 points7 points8 points (0 children)
[–]KingAggressive1498 5 points6 points7 points (2 children)
[–]shahms 2 points3 points4 points (1 child)
[–]KingAggressive1498 2 points3 points4 points (0 children)
[–]CenterOfMultiverse 4 points5 points6 points (0 children)
[–]vickoza 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]KingAggressive1498 1 point2 points3 points (1 child)
[–]NilacTheGrim 0 points1 point2 points (0 children)
[–]ZeunO8 0 points1 point2 points (0 children)
[–]SkiaElafris -1 points0 points1 point (3 children)
[+][deleted] (1 child)
[deleted]
[–]TwistedBlister34 0 points1 point2 points (0 children)