Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1366

Declare libbson vtable in MINIT instead of using a global

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.10.0-alpha1, 1.10.0
    • Affects Version/s: None
    • Component/s: None
    • None

      According to Globals Management, GINIT is called once before MINIT (in both threaded and non-threaded models) and additionally once for each thread as it is spawned. Our libbson vtable is currently stored in an extension global (copied per thread) and initialized in GINIT. It would make more sense to declare this as a local variable within MINIT where it is assigned.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: