You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Blake Bender (Jira)" <ji...@apache.org> on 2021/01/29 00:22:00 UTC

[jira] [Created] (GEODE-8887) Switch EventId thread and sequence logic to Meyers singleton pattern

Blake Bender created GEODE-8887:
-----------------------------------

             Summary: Switch EventId thread and sequence logic to Meyers singleton pattern
                 Key: GEODE-8887
                 URL: https://issues.apache.org/jira/browse/GEODE-8887
             Project: Geode
          Issue Type: Improvement
          Components: native client
            Reporter: Blake Bender


As a developer, I need to be able to rely on the order of initialization of my global and/or thread local singleton objects, in order to reasonably expect things to work that count on said objects.  The current EventIdTSS implementation doesn't use Meyers singleton, and thus the order of initialization shows up seriously different from what you'd imagine.  In particular, the thread local EventIdTSS object _appears_ to be initialized long before it is used on each thread, _and_ many of the threads the NC spins up will _never_ use it, leaving us with a couple of dozen or more extra copies of this thing lying around.  Switching to the standard C++ singleton pattern will make this code a lot more deterministic, in addition to much more readable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)