mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-2787 add comment about double-checked locking
X-SVN-Rev: 11822
This commit is contained in:
parent
e55480b50b
commit
2d1f3e63a9
1 changed files with 6 additions and 0 deletions
|
@ -115,6 +115,12 @@ uchar_cleanup()
|
|||
static int8_t
|
||||
loadPropsData(void) {
|
||||
/* load Unicode character properties data from file if necessary */
|
||||
|
||||
/*
|
||||
* This lazy intialization with double-checked locking (without mutex protection for
|
||||
* haveNormData==0) is transiently unsafe under certain circumstances.
|
||||
* Check the readme and use u_init() if necessary.
|
||||
*/
|
||||
if(havePropsData==0) {
|
||||
UTrie trie={ 0 }, trie2={ 0 };
|
||||
UErrorCode errorCode=U_ZERO_ERROR;
|
||||
|
|
Loading…
Add table
Reference in a new issue