By definition, true threads don't share memory, and therefore cannot share data.
I am looking for a way, however, to keep a running connection count (not just connections, a few other things) that can be updated from within any one of the threads in a server, and will be shared (static) across all threads. How would I do this?
A Few Notes:
Performance is key, so no databases, no external server connections, preferably no Memcached
This data is meant to be updated several thousand times a second
The data must, after being updated from one thread, be instantaneously available, with the new value, to all other threads
Ideally, the data should be simultaneously available to multiple threads