# Actor Model fundamentals compromised?

**URL:** <https://forum.dfinity.org/t/actor-model-fundamentals-compromised/3837>\
**Category:** Language Support\
**Tags:** Motoko\
**Created:** [May 16, 2021, 10:25pm UTC](https://forum.dfinity.org/t/actor-model-fundamentals-compromised/3837 "2021-05-16T22:25:02Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)\
**Post date:** [May 18, 2021, 7:02am UTC](https://forum.dfinity.org/t/actor-model-fundamentals-compromised/3837/25 "2021-05-18T07:02:00Z")

</div>

> [@paulyoung](#):
>
> would a compelling minimal example of this behavior for Motoko be something like the following?

Yes! A perfect example.

> [@levi](#):
>
> How does Rust compare to Motoko in this context?

It’s pretty much the same. The underlying execution model, as provided by the system, is the same, and the syntactic sugar in the form of `async`/`await` has the same properties.

> [@levi](#):
>
> Does Rust have the ability for the “upgrade while the call is in the flight” ?

Ah, upgrades-without-stopping … interesting topic, maybe worth it’s own thread. But here are some comments (and all of them apply to rust and motoko):

- The system doesn’t stop you from upgrading a canister that isn’t “stopped”. But it isn’t always a good idea.

- If you have a canister that never does outgoing calls, you can safely upgrade atomically without stopping, and have no downtime.

- If you have a canister that you know at the moment has no outgoing calls, you can safely upgrade atomically without stopping, and have no downtime.

- If you have a conventional canister (Motoko or Rust), and you might have outstanding calls, you really really should not upgrade without stopping first.

- Theoretically, you _can_ write canisters that you can upgrade while the call is in flight, if you make sure that the functions handling the callbacks are at the same position in the table. For example if you write your canister by hand in wasm, or beef up your Rust toolchain, or maybe some clever post-processing.

- We have plans (but not high priority, unfortunately) to change or extend the System Interface to remove the problem that you can corrupt your state if you get this wrong, by delivering callbacks to _named_ exported functions of the module (separate from the public methods, though).

---

_[View the full topic](https://forum.dfinity.org/t/actor-model-fundamentals-compromised/3837)._
