Click here to Skip to main content
15,885,979 members
Articles / Programming Languages / C++

Between Mutex, Semaphore and Horrible Hairdos

Rate me:
Please Sign up or sign in to vote.
4.91/5 (7 votes)
28 Oct 2022CPOL5 min read 4.1K   3  
Mutex or Semaphores are here to offer non-recursive semantics, so your program, or chunks of your code will only run once — no hairspray needed...
Back in the jolly days of horrible hairdos, it was possible to run several instances of a program repeatedly on a single machine: multiple windows were opened one on top of each other endlessly. Today, in most cases, we want to make sure our program runs once per machine. Mutex or Semaphores are here to offer non-recursive semantics, so your program will only run once — no hairspray needed.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO Secured Globe, Inc.
United States United States
Author, key speaker, entrepreneur, cyber security, cyber forensics expert and consultant, as well as a hands on C++ professional with 25+ years of experience in the industry. Founded Secured Globe, Inc. together with her husband, Michael Haephrati. A professional painter, illustrator and photographer always seeking for the next great shot…

Comments and Discussions