Skip to content
Tcl Source Code Artifact [044c20d98d]
Login

Artifact [044c20d98d]

Artifact 044c20d98d7fd0bd2c885fb2081f56fea0a4dec8fb3f6013e7f9817d3a9a7cc0:

Ticket change [044c20d98d] - Ticket [112af76b090286f9|112af76b09] <i>Double-checked locking pervades the Tcl implemetation</i> status still Open with 3 other changes by serhiy.storchaka on 2026-10-14 15:57:48.
D 2026-10-14T15:57:48.946
J icomment The\slazy\sinitialization\sof\sTcl_Mutex\sand\sTcl_Condition\scan\sbe\smade\scorrect\swithout\schanging\sthe\sAPI:\san\sacquire\sload\sfor\sthe\sunlocked\scheck,\sand\sa\srelease\sstore\swhen\sthe\snew\sobject\sis\spublished.\sOn\sx86\sthese\sare\sordinary\sloads\sand\sstores,\sso\sthe\sfast\spath\sis\snot\sslower.\sTcl_ThreadDataKey\sonly\sstores\san\sindex\sinto\sa\stable\sowned\sby\seach\sthread,\sso\sit\sdoes\snot\sneed\sthis.\n\nProposed\sfix\sin\sbranch\s[/timeline?r=double-checked-lock-ordering|double-checked-lock-ordering]\sfor\sTcl_MutexLock()\sand\sTcl_ConditionWait2()\son\sUnix\sand\sWindows,\sand\sfor\sthe\ssame\spattern\sin\sthe\snotifier\sthread\sstart\s(select\snotifier)\sand\sin\sthe\sWindows\spipe\sand\sserial\sinitialization.\sA\sTcl_Once\sAPI\swould\sneed\sa\sTIP.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K 112af76b090286f9f0f04c8b994c252bb1b82bd8
U serhiy.storchaka
Z 94ddcb06b0d483110e45bcaae507ef96