1. Roland Smith
  2. PowerServer
  3. Wednesday, 6 March 2024 21:25 PM UTC

I am pretty sure I saw somewhere in the documentation a list of features that we shouldn't use in background threads. Now I can't find it.

I have a multi-threaded C++ app that calls PB code using PBNI. For some reason if it is processing more than one thread at a time, the ExportJSON datastore method causes the program to abort. If it is only processing one thread, it works as expected.

Tracy Huang @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 March 2024 08:52 AM UTC
  2. PowerServer
  3. # 1

Hi Roland,

Are you talking about the note on this page: https://docs.appeon.com/pb2022r3/objects_and_controls/CoderObject_object.html?

Generally speaking, PB features (added after 12.6) do not support multi-threading.

Regards

Tracy

 

Comment
  1. Miguel Leeuwe
  2. Thursday, 14 March 2024 10:48 AM UTC
Any alternative to multi threading you'd recommend?
  1. Helpful
  1. Tracy Huang @Appeon
  2. Friday, 15 March 2024 07:44 AM UTC
Hi Miguel,

The team needs more time and feedback before they can decide what to do or say in the product and documentation.

Regarding alternatives, for HTTPClient, you may consider implementing multi-thread in .NET and then call .NET DLLs in PB.



Regards, Tracy
  1. Helpful 1
  1. Miguel Leeuwe
  2. Friday, 15 March 2024 09:40 AM UTC
Thank you Tracy. That's what I was thinking of. We're going to be programming more and more in .Net.
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 7 March 2024 07:57 AM UTC
  2. PowerServer
  3. # 2

Hi Roland,

Yes, there are some features that are not threadsafe. But I don't know a documentation about this. Would be nice to have one.

I found out this features are not threadsafe:

- Metaclass

- HTTPClient (I think this was fixed with 2022 R3)

 

Comment
  1. Arnd Schmidt
  2. Thursday, 7 March 2024 09:26 AM UTC
  1. Helpful 2
  1. mike S
  2. Tuesday, 12 March 2024 13:03 PM UTC
The help still lists HTTPClient as not threadsafe. I assume the help was not updated.
  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.
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.