Skip to content

Instantly share code, notes, and snippets.

View grantrostig's full-sized avatar
💭
C++, AI/ML, ChatBots

Grant Rostig grantrostig

💭
C++, AI/ML, ChatBots
View GitHub Profile
@grantrostig
grantrostig / cpp-thread-safe-initialization.md
Created November 26, 2023 06:11 — forked from louis-langholtz/cpp-thread-safe-initialization.md
C++ Requires Thread Safe Initialization of Block-Scope Variables With Static or Thread Storage Duration

C++: Thread Safe Initialization Requirements

Seems like this has come up for me enough in discussing C++ with others, that it might help to put together the information in this gist.

Standard C++ has since C++11 required that block-scope variables with static or thread storage duration get initialized in a thread safe way. Besides there being a StackOverflow answer - to a related question - showing some example assembly for C++11 that includes thread safe guards, there's also the C++ standard documents themselves.

What follows is the specific requirement by versions of the standard.

C++03

@Atlas7
Atlas7 / useful-resource-page.md
Last active October 30, 2023 10:10
Useful Resources

Introduction

Over time I come across lots of useful resources but then quickly forget about them. What a shame. So I have decided to put it all together in this page. Hopefully this page will come in handy one day. Will populate this page from time to time.

Dictionary type web / app

AI / Machine Learning / Deep Learning