Mir

Comment 1 for bug 1151645

Revision history for this message
Michi Henning (michihenning) wrote :

If an async invocation returns the same handle for two different invocations, it's broken.

The whole point of having async calls return a token that identifies this particular call is to make sure that *all* of the state to complete an async invocation is encapsulated in that token. If that is not the case, I can no longer reliable distinguish the state for outstanding async invocations.

We had a similar problem in the old API for async invocations in Ice. There were scenarios were it was possible to accidentally reuse an async handle/object while a previous invocation was still in flight, causing the Ice run time to get confused.

In short, the solution to the problem is to encapsulate *all* of the state that is required to complete an async invocation in the start/begin/launch method of that invocation. There must be no state that persists in the run time in between the start and the end call, otherwise there will be problems down the track.