Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice.Context and AMI calls

Hi,

Can you confirm that Ice.Context is copied using the caller thread
when passed per method call even for AMI calls?
It does look so from the code but want to make sure this is a documented
behavior which I can count on (so I don't need to clone it myself).

Thanks,
Arie.

Comments

  • Yes, that it correct. Whether call is made immediately or made later in the background, the context information is copied into the marshaled representation.

    You need to be careful though if you modify a context that is passed to several AMI invocations: if you write to the context while the client-side run time is marshaling its contents, things are likely to go wrong. So, you will need to interlock somehow such that the context is modified only at times where no invocation is in progress.

    Cheers,

    Michi.