Putting thread on hold from its own reply gen proc

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Putting thread on hold from its own reply gen proc

  • Creator
    Topic
  • #48583
    Roger Holmes
    Participant

    I know this topic has been written about before, but I think this is a new twist on the subject.

    I’ve implemented the recover 33 procs (my modified version).  I’ve got a proc in the reply generation to handle a timeout if no ack is received.  I’ve got code in there to skip a message and go onto the next one if a customer so chooses.  I also let them choose how many messages to skip before we stop the data flow and let them look for a problem.  What I’m doing is using exec to call a unix script that uses hcicmd to put the thread on hold in the reply gen proc and after the exec finished, the code then puts the saved message back on the outbound q.  My desire is to have that message NOT get sent out before the thread hold request is honored.  My question is, can I guarantee that will happen every time.  In my testing, the thread is put on hold ok, and the message is in the OBQ.  I wonder though, is the timing just lucky and will it always happen that way, or is there a chance the message could get sent out the Q before the thread is put on hold.

    My testing shows it works this same way calling exec in the foreground or the background.  The only difference I see is that when run in the foreground, the command times out thinking the thread is hung, a cmd errors get logged to the log file.  I know why this is happening – because I’m calling the hold from tps in the thread I want to hold.  However, everything works as planned: the msg is sent to the OBDQ and the thread is put on hold.  When I run the exec command in the background, the msg is still q’d, the thread is put on hold, and there are no error msgs written to the files.

    One more question.  Are events q’d in the thread in an order?  i.e. will the call to hcicmd place a “hold” event on an engine event Q and is that the same event Q that the sending of the message (via PROTO) is q’d on, or is there even such a thing as an “event” q?

    Oh well, I hope someone is interested in this and can shed some ligt on it for me.  I really want to know if I can guarantee that the thread is put on h old everytime before the message gets requeued.

    Thank you for your time!

    Roger holmes

    Sentara Health Care

    757-747-4589

  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10