Shutting Down Thread in tcl

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Shutting Down Thread in tcl

Viewing 6 reply threads
  • Author
    Replies
    • #78050
      Jerry Tilsley
      Participant

        David,

        I would look at pointing in an proc in the “Send OK Procs” of the Outbound Replies if this is a TCP type connection.  That way once the reply is generated from the TPS Inbound Data and is confirmed sent back to the sending system, then the script would execute to shut down the thread.  If not a TCP type connection maybe we can come up with another idea.

        Thanks,

        Jerry

      • #78051
        David Harrison
        Participant

          Jerry,

          It

        • #78052
          Jerry Tilsley
          Participant

            David,

            Is your goal to not have the same file picked up twice?

            Thanks,

            Jerry

          • #78053
            David Harrison
            Participant

              I won’t pick the file up twice becase I rename it after processing.

            • #78054
              David Barr
              Participant

                Maybe you should try running your hcicmd command in the background. Try adding an “&” at the end of the exec command. “hcicmd” is a way to send commands to the command thread of your process. But if the process is waiting for the tps proc to complete then the command thread will never be able to receive the command. Of course you’ll have no way to write error handling code in your TPS proc because that proc must return before the thread shutdown is issued.

                I would probably avoid this method of handling the problem. Why not just have your UPOC check every few minutes all day long? You could set up some kind of alert if you don’t pick up the file at the expected time and keep trying. You could use just one thread for handling the file regardless of whether it was created manually or automatically.

              • #78055
                Jerry Tilsley
                Participant

                  I agree with David Barr on this one.  We have many connections that only pickup a file or two a day, but we let them scan all day.  Unless your system is really bogged down for some reason, you will not notice any performance issues by just letting it scan periodically.  You could also adjust the time to just look every fifteen minutes instead of five.  That’s my two cents anyway.

                • #78056
                  David Harrison
                  Participant

                    I’m convinced.

                    Thanks for your input David and Jerry.

                Viewing 6 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.