Timeout in processing

Asked

Viewed 248 times

4

I’m doing an integration with SAT, when I can’t communicate with the equipment the application hangs. Is there any way I can stipulate a time limit for this process to run, canceling the operation when the timeout get hit?

  • Man, depending on the process, could detail better which process you want to cancel?

  • in this case I am doing an integration with SAT, when I can’t communicate with the equipment the application hangs. I would like to set a timeout and stop the communication process when the time is reached.

  • I will edit your question by adding this information. Is there any way you can verify that the communication was successfully conducted? If yes, just put on a timer, no?

  • 1

    When it is not possible to make the communication, the process is locked in the command where I activate the equipment, so I do not have a return informing that the communication failed.

  • Try talking to the head of the SAT device, check why this lock occurs when canceling an operation.

1 answer

1

Thread and set a timeout for the thread, so you will call the SAT inside the thread and if any problem occurs, the thread timeout will be reached and the system will exit.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.