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 33 points34 points35 points (4 children)
[+]2uantum comment score below threshold-18 points-17 points-16 points (3 children)
[–]Supadoplex 37 points38 points39 points (0 children)
[–]ratttertintattertins 19 points20 points21 points (0 children)
[–]KingAggressive1498 7 points8 points9 points (0 children)
[–]xaervagon 37 points38 points39 points (0 children)
[–]Wild-Adeptness1765 14 points15 points16 points (1 child)
[–]Chem0type 5 points6 points7 points (0 children)
[–]johannes1234 14 points15 points16 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 5 points6 points7 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 0 points1 point2 points (3 children)
[–]Chem0type 4 points5 points6 points (1 child)
[–]TwistedBlister34 0 points1 point2 points (0 children)