Home » U++ Library support » U++ MT-multithreading and servers » Core multithread dangers
Core multithread dangers [message #835] |
Fri, 03 February 2006 23:09 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I was told before that Core & Web packages are thread-safe. But some methods of Core are not thread-safe, and something like
CriticalSection::LockMain should be added to them to fix this. Here is a list of them.
static TimingInspector& s_zero()
TimingInspector::TimingInspector(const char *_name)
static void sInit()
String& sHomeDir()
String ConfigFile(const char *file)
byte *Alloc4KBRaw()
void *MemoryAllocPermanent(size_t size)
void *MemoryAlloc(size_t size)
void MemoryProbe(const char *name, dword flags)
const LanguageInfo& GetLanguageInfo(int lcode)
static Array<LngModule>& sMod()
CriticalSection& MainCriticalSection()
PageInfo *NewPage(int magnitude)
static CriticalSection& sHeapLock()
static CriticalSection& sHeapLock2()
static inline void sInitTables()
void MemoryInitDiagnostics()
RHITCOUNT(n)
static int sMappingGranularity_()
VectorMap<String, VectorMap<String, VectorMap<String, Topic > > >& TopicBase()
String GetIniKey(const char *name)
These other functions of Core need bigger rewrite to be threadsafe:sDumpPtr(void *ptr)
sDump(dword w)
const char *Dump(PageInfo *page)
const char *MemoryCounters()
These functions of the Web package are not thread-safe:
void HttpServer::ReadPostData(Socket& socket, HttpQuery& query)
void SSLInit()
static const dword *GetCRCTable()
RefPtr<HttpQuery::Data> HttpQuery::Empty()
dword WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *ecb)
The problem is always with the local static variables which are not protected from parallel initialization on two threads.
|
|
|
|
|
Core multithread dangers
By: hojtsy on Fri, 03 February 2006 23:09
|
|
|
Re: Core multithread dangers
By: mirek on Fri, 03 February 2006 23:51
|
|
|
Re: Core multithread dangers
By: mirek on Sat, 04 February 2006 12:14
|
|
|
Re: Core multithread dangers
By: hojtsy on Sat, 04 February 2006 14:53
|
|
|
Re: Core multithread dangers
By: mirek on Sat, 04 February 2006 18:20
|
|
|
Re: Core multithread dangers
By: mirek on Mon, 06 February 2006 11:46
|
|
|
Re: Core multithread dangers
By: hojtsy on Mon, 06 February 2006 14:18
|
|
|
Re: Core multithread dangers
By: mirek on Mon, 06 February 2006 14:24
|
|
|
Re: Core multithread dangers
By: hojtsy on Mon, 06 February 2006 14:37
|
|
|
Re: Core multithread dangers
By: mirek on Mon, 06 February 2006 14:52
|
|
|
Re: Core multithread dangers
By: mirek on Mon, 06 February 2006 19:19
|
|
|
Re: Core multithread dangers
By: hojtsy on Tue, 07 February 2006 09:59
|
|
|
Re: Core multithread dangers
By: fudadmin on Tue, 07 February 2006 11:09
|
|
|
Re: Core multithread dangers
By: unodgs on Tue, 07 February 2006 11:41
|
|
|
Re: Core multithread dangers
By: fudadmin on Tue, 07 February 2006 12:49
|
|
|
Re: Core multithread dangers
By: mirek on Tue, 07 February 2006 14:42
|
Goto Forum:
Current Time: Mon Apr 29 18:27:36 CEST 2024
Total time taken to generate the page: 0.02808 seconds
|