Hi Narayana,
yes, you can leverage Shared Objects for that.
- SharedObjectRegister allows to instantiate a PB NVO as a "shared" object (an object running in a different thread)
- SharedObjectGet gets a reference variable to the shared object
A method in the new thread can be executed asynchronously if called with POST, e.g. inv_shared.POST of_myLongProcess(...). Finally, if you need to send the results from the shared object to the main thread (usually the application), you must have the shared object to execute an "interface" object's method (a.k.a. "callback") and pass results.
In a nutshell (please refer to PB help):
1) SharedObjectRegister("nvo_shared", "share1”)
2) SharedObjectGet("share1", nv_thread1)
3) nv_thread1.POST myLongProcess(arg1, … , nv_callback)
4) nv_callback.POST display_values(val1, …)
Cheers,
Marco
Thanks, I will go through that
Narayana