1. Ricardo Colarina
  2. PowerBuilder
  3. Wednesday, 6 September 2017 05:18 AM UTC

Hi Guys,

I've got a multithreading process working, but occasionally when processing several tens of thousands of rows, the application freezes.  Any idea what may be causing the freezing?  Also, I've got both the shared and callback NVOs using just the one NVO having all the functions.  So when instantiated, both are actually the same NVO, but each object only invokes the functions it should be invoking, as in the shared NVO calling functions passing the callback NVO.  Is it a bad idea not to have separate NVOs for shared and callback objects?

Thanks.

Best Regards,

Ricardo

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 6 September 2017 13:03 PM UTC
  2. PowerBuilder
  3. # 1

HI Ricardo;

   FWIW: I agree with Ullrich ... "To use same NVO for shared object and callback object could work. But I think it's not a good design."

   I am not sure if this helps, but my framework supports multi-threading using two NVUO's. In fact, I have ancestors and methods all around these shared object ancestors you can look at. You can download the example App from here.

HTH

Regards ... Chris

Comment
  1. Ricardo Colarina
  2. Thursday, 7 September 2017 02:15 AM UTC
Thanks guys.  I've fixed the freezing.  I just made sure the DW is informed that the process has finished.

  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 6 September 2017 08:01 AM UTC
  2. PowerBuilder
  3. # 2

It's difficult to say whats the reason for freezing application. Maybe there is some unhandled exception (is it running well without shared objects?), some wrong usage of communication between main process and threads (post vs call) or you use some not threadsafe functions (not all Powerbuilder functions and objects are threadsafe; also external functions may be a problem). Also memory usage / garbage collection may be a problem.

To use same NVO for shared object and callback object could work. But I think it's not a good design.

Comment
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.