On Thu, May 18, 2017 at 5:00 AM, Rony G. Flatscher <[email protected]>
wrote:
> rexxpg.pdf states in "8.5 Garbage Collection Considerations": ... "The
> global reference can be used with any API context valid for *the same*
> interpreter instance." ...
>
> - Question 1: does that mean that a "global" reference obtained with
> RequestGlobalReference() can only be used within a single Rexx interpreter
> instance safely?
>
>
There's really only one global reference table shared between all
instances, so they can be used safely across instances.
>
> -
> If so, how could one create Rexx objects via native code in one Rexx
> interpreter instance and use them in another Rexx interpreter instance,
> like Rexx objects that are stored in .environment, which are accessible
> from any Rexx interpreter instance?
>
> - Question 2: does the ReleaseGlobalReference() have to be called via
> the Rexx interpreter instance that was used to create the global reference
> in the first place, or is it possible to use any Rexx interpreter instance
> for this purpose?
>
> You can do it from any instance, but since that behavior is not part of
the documentation, there's no guarantee it will always be that way. I
really don't understand why you are complicating things by creating so many
instances. You're gaining nothing but a bunch of overhead. I would really
only expect that to be used for multiple applications running in the same
process that have no knowledge of how Rexx might be being used elsewhere.
For most applications, an AttachThread()/DetachThread() should be
sufficient. If you are asking the sorts of questions you are asking, then
creating a new instance is not appropriate.
Rick
Rick
>
> -
>
> ---rony
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel