Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Configuration Reload

Configuration Reload

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Soumyadipta
    wrote on last edited by
    #1

    1. I am using a std::map to store some values of keys 2. On startup of my function i am loading values to my map 3. I am storing values to my map by a http call which is returning the key and values from a file. 4. Now i have changed my configuration file and i want to reload the config map without restarting my process 5. lots of places i am already accessing this map How safely i can reload my configurations? Please need some idea and help Regards, Samba :confused: :confused:

    R 1 Reply Last reply
    0
    • S Soumyadipta

      1. I am using a std::map to store some values of keys 2. On startup of my function i am loading values to my map 3. I am storing values to my map by a http call which is returning the key and values from a file. 4. Now i have changed my configuration file and i want to reload the config map without restarting my process 5. lots of places i am already accessing this map How safely i can reload my configurations? Please need some idea and help Regards, Samba :confused: :confused:

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      Soumyadipta wrote:

      4. Now i have changed my configuration file and i want to reload the config map without restarting my process 5. lots of places i am already accessing this map How safely i can reload my configurations?

      With the limited information you've given at least I can only give a general answer... You have to trigger the "reloading" procedure in some way. If you by "accessing the map" mean that you're using the map from different threads, you also need to provide thread synchronization using a critical section or mutex.

      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
      "High speed never compensates for wrong direction!" - unknown

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups