Skip to content
Tcl Source Code Artifact [dc4a793d24]
Login

Artifact [dc4a793d24]

Artifact dc4a793d24bcee675edd4a8eaedffc735e5f23ea:

Wiki page [Global Values] by dgp on 2014-10-09 19:58:19.
D 2014-10-09T19:58:19.640
L Global\sValues
P 9ae4ca0574cf0927e50e2fd49bae7e8e02ce3f2b
U dgp
W 1326
<h1>Source Files</h1>
  *  portions of [/finfo?name=generic/tclUtil.c|tclUtil.c]

<h1>Public Interface</h1>
  *  <i>None</i>

<h1>Private Interface</h1>
  *  struct ProcessGlobalValue
  *  TclGetProcessGlobalValue
  *  TclSetProcessGlobalValue

<h1>Directly Depends On Public Interface</h1>
  *  [Hash Tables]
  *  [Tcl_Obj System]
  *  [Threads]
  *  [Allocation]
  *  [Encoding]
  *  [Event Loops]
  *  [Dynamic Strings]
  *  [Panic]

<h1>Directly Depends On Private Interface of</h1>
  *  <i>None</i>

<h1>Discussion</h1>

A system for managing Tcl values that must be shared by
the entire process, including all threads, but using caching
so that thread locking is avoided when possible.  Is able to
withstand changing values of the system encoding.  Best for
things written once or few times and then read many times,
and for things that have to be first recorded with one system
encoding active, then read with a different one in place.
Implemented entirely using public interfaces, so extensions
could copy or even be the provider of this.

It appears that the implementation lacks the memory fences
required to make it robustly portably correct.  It makes
unwarranted assumption about what an epoch value can reliably
tell you about the controlled values in a multi-core setting.
Z bf8f806c110ab9cce84ec3c12b00831a