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#
  4. Technic or best way to know if an application is "ready" when it is started from another application ?

Technic or best way to know if an application is "ready" when it is started from another application ?

Scheduled Pinned Locked Moved C#
csharpc++devopsquestion
3 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.
  • M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    (both applications are written by us, application A can be a C# application or a C++ application ) I have an application A that starts application B. I would need to know when application B is ready to process some rpc messages from application A. I was thinking of sending a windows event from application B and wait for it in application A (application A can wait a little bit, no need to be extra fancy) Or maybe start sending rpc (dummy ping) message in repetition from application A until application B can answer them properly ? Any other better way to do this ? Thanks.

    CI/CD = Continuous Impediment/Continuous Despair

    L 2 Replies Last reply
    0
    • M Maximilien

      (both applications are written by us, application A can be a C# application or a C++ application ) I have an application A that starts application B. I would need to know when application B is ready to process some rpc messages from application A. I was thinking of sending a windows event from application B and wait for it in application A (application A can wait a little bit, no need to be extra fancy) Or maybe start sending rpc (dummy ping) message in repetition from application A until application B can answer them properly ? Any other better way to do this ? Thanks.

      CI/CD = Continuous Impediment/Continuous Despair

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Why not get application B to send the first message? That way application A knows that B is ready.

      1 Reply Last reply
      0
      • M Maximilien

        (both applications are written by us, application A can be a C# application or a C++ application ) I have an application A that starts application B. I would need to know when application B is ready to process some rpc messages from application A. I was thinking of sending a windows event from application B and wait for it in application A (application A can wait a little bit, no need to be extra fancy) Or maybe start sending rpc (dummy ping) message in repetition from application A until application B can answer them properly ? Any other better way to do this ? Thanks.

        CI/CD = Continuous Impediment/Continuous Despair

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If A has a FileSystemWatcher, and B writes a file when it starts, A gets a wake-up call via the FileSystemWatcher's event handler. [FileSystemWatcher Class (System.IO) | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=net-6.0)

        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

        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