1. mike S
  2. PowerServer
  3. Monday, 18 December 2023 16:11 PM UTC

if a HALT is issued, will it kill off the entire application including any shared objects (multi threading)?

Mainly this is for PS application, but i assume it should work the same in PB

mike S Accepted Answer Pending Moderation
  1. Monday, 18 December 2023 18:17 PM UTC
  2. PowerServer
  3. # 1

i see in application systemerror event the halt does not actually shutdown the application:

case 224
//Session fails to respond (Session does not exist)
MessageBox ("Session closed or killed", 'Please restart your application')
HALT 

 

 

after clicking ok on the messagebox, the application continues to run

 

Comment
  1. Chris Pollach @Appeon
  2. Monday, 18 December 2023 20:54 PM UTC
My guess is that in your case, it might be related to an open "thread" issue.

Have you tried doing a SharedObjectUnregister() first & then the Halt commands?
  1. Helpful
  1. Logan Liu @Appeon
  2. Tuesday, 19 December 2023 07:39 AM UTC
Hi Mike, if some registered threads are not stopped before calling Halt, they may still be working for a very short time after Halt is called.

You can add more code to stop other threads before calling Halt.

Regards, Logan
  1. Helpful
  1. mike S
  2. Tuesday, 19 December 2023 13:08 PM UTC
"still be working for a very short time after Halt is called"

I'm talking about still running hours later.



In any case, the documentation on what halt does is not correct. probably never updated after multi threading was added.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.