question of how to properly dispose of a message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf question of how to properly dispose of a message

  • Creator
    Topic
  • #48439
    Julie Kimmel
    Participant

      Hello all,

      I need a simple clarification if anyone could help me.

      I have some messages that I want to route to one thread if a patient name is … oh say…’John’

      I want to route all other patients not named ‘John’ to a different thread.

      I have my tcl pre-procs written to filter by name, but my question is…just how do I ‘kill/suspend’ the message?

      I can do ‘lappend dispList “KILL $mh”‘ to the ones that I don’t want to go to that thread, and that works.

      However…I can also not do lappend dispList “KILL $mh”, but instead just say ‘return “”‘

      Both of these provide the results that I want…but I don’t know which way is correct.

      Could someone please let me know, and also let me know why one would be incorrect?

      I don’t want to accidentally kill something that I am not supposed to, and I also don’t want to leave lingering messages out there….and I am not sure if one of my killing methods results in either of those situations.

      Thanks,

      Julie

    Viewing 1 reply thread
    • Author
      Replies
      • #58637
        Bill Bertera
        Participant

          If you don’t return the mh with some dispList, they’ll linger and you’ll get a “leaked handle”. They’ll get killed when you stop the process, but its bad practice. You can see them in the log file after you stop the process.

        • #58638
          Julie Kimmel
          Participant

            lovely…just what I was looking for…Thank you!

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