1. Miguel Leeuwe
  2. PowerBuilder
  3. Wednesday, 11 January 2023 07:14 AM UTC

Hi,

I didn't want to interfere in the bug report, so I'm posting my doubt here:

In https://www.appeon.com/standardsupport/search/view?id=9546 , "Kitty He" claims that posted events run asynchroneously. That's a surprise to me. Is that really the case? Is it some latest change in how PB behaves?

Is she saying that if I do the following:

event post ue_a()

event post ue_b()

...

ue_b() might start and finish before ue_a() has finished?

regards.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 13:43 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Miguel;

  You are correct ... A posted event only means that a message is added to the end of the O/S message queue. The PB App is still processing messages from the front of the queue in the order that they were added. Eventually, the post message event will work its way to the front of the message queue. Then it will actually be processed & take effect. 

   For asynchronous processing, you would use the SharedObjectXxxxx PB commands.

Regards ... Chris 

Comment
  1. Miguel Leeuwe
  2. Wednesday, 11 January 2023 13:49 PM UTC
Thanks Chris! That's re-assuring. I was already afraid I'm going to have to revise all of our apps, since we heavily depend on the assumption that things will run synchroneously. I'll post a link to this Q&A on the involved ticket.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 11 January 2023 18:19 PM UTC
So really a POST Event / Function is basically delaying when the method runs by where the "trigger" message is placed within the current O/S message queue. That allows other "queued" messages for any object to be processed ahead of the POSTed one(s).
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.