Are static array pointers thread safe?
- From: flowstudioLA@xxxxxxxxx
- Date: Thu, 29 Nov 2007 17:50:49 -0800 (PST)
Can multiple threads safely use static array pointers as in the class
below? What are the dangers if not?
class foo{
static int (*a)[26][26];
void createArray();
void writeToArray(int a, int b, int c, int d);
int readFromArray(int a, int b, int c);
}
int (*foo::a)[26][26];
void foo:createArray(){
a = new int[26][26][26];
}
void foo:writeToArray(int a, int b, int c){
a[a][b][c] = d;
}
void foo::readFromArrat(int a, int b, int c){
return a[a][b][c];
}
.
- Follow-Ups:
- Re: Are static array pointers thread safe?
- From: Joseph M . Newcomer
- Re: Are static array pointers thread safe?
- From: Doug Harrison [MVP]
- Re: Are static array pointers thread safe?
- Prev by Date: Re: CDHtmlDialog fail to load image in Vista
- Next by Date: Re: Are static array pointers thread safe?
- Previous by thread: Problem in sharing common resource header..
- Next by thread: Re: Are static array pointers thread safe?
- Index(es):
Relevant Pages
|
Loading