![]() ![]() Now, let's move from the abstract world closer to the reality. ![]() ![]() ![]() For example, during process or thread startup/shutdown mutexes and condition variables is the way to go. Generally it's perfectly Ok to use mutexes/condition variables/semaphores/etc on cold-paths. Why not? The most stupid thing one can do is try to implement everything in a non-blocking style (of course, if you are not writing infantile research paper, and not betting a money). However, they play fundamental role in synchronization algorithms, and they are what you should generally strive for - atomic loads and stores are better/cheaper/faster than atomic RMW operations. They are frequently unfairly underestimated. They are not RMW (read-modify-write) operations, they are just independent atomic loads and stores.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |