# Can I run multiple inter-canister update calls in parallel?

**URL:** <https://forum.dfinity.org/t/can-i-run-multiple-inter-canister-update-calls-in-parallel/13115>\
**Category:** Developers\
**Created:** [May 19, 2022, 4:47am UTC](https://forum.dfinity.org/t/can-i-run-multiple-inter-canister-update-calls-in-parallel/13115 "2022-05-19T04:47:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![free](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/free/32/615_2.png) [@free](https://forum.dfinity.org/u/free)\
**Post date:** [May 19, 2022, 10:19am UTC](https://forum.dfinity.org/t/can-i-run-multiple-inter-canister-update-calls-in-parallel/13115/2 "2022-05-19T10:19:43Z")

</div>

Should work just fine on the IC, canister calls are asynchronous.

E.g. if you have one incoming ingress message that executes the code above, the sequence of events is the following:

1. Ingress message is executed as transaction. It enqueues N outgoing canister requests into its output queues and finishes execution when it hits the `await` (persisting any local variables, call stack, etc. into a _call context_; and reserving a _callback_ referring to this _call context_ for each of the enqueued requests). (One transaction)
2. Each of the requests is routed to whatever destination canister and executed, producing a response. (N transactions)
3. Each response is routed to your original canister and each is executed as a separate message, updating the _call context_ created at step (1) (e.g. by marking the respective future under `join_all()` as `Ready`) and dropping the corresponding callback. (N transactions)
4. (Actually 3b) When the last response at step (3) is executed, all _callbacks_ have been dropped, the `await` returns and execution of the code beyond it continues, eventually producing a reply to the ingress message and dropping the _call context_. (This the Nth transaction from step (3) above, not a separate transaction.)

All in all, you have N+1 transactions executed on your canister (the ingress message plus N responses) and N transactions executed on downstream canisters (each request you’ve sent, assuming these complete immediately and don’t result in further downstream messages). It’s just a whole lot of messages being passed around and executed asynchronously (except that all messages executed on a given canister are executed sequentially – since canisters are single threaded – but in no particular order).

---

_[View the full topic](https://forum.dfinity.org/t/can-i-run-multiple-inter-canister-update-calls-in-parallel/13115)._
