M
Marcin Kalicinski
I'm trying to write platform-independent code that will work correctly in
multithreaded environment. I know C++ standard says nothing about threads,
but I still think my question is not entirely off-topic here:
int f()
{
static int n = g();
return n;
}
If I call the above function from multiple threads, can I still assume that
g() will only be called once? Or is it platform dependent?
thank you,
Marcin
multithreaded environment. I know C++ standard says nothing about threads,
but I still think my question is not entirely off-topic here:
int f()
{
static int n = g();
return n;
}
If I call the above function from multiple threads, can I still assume that
g() will only be called once? Or is it platform dependent?
thank you,
Marcin