# Is \`system.perspective.sendMessage()\` blocking?

**URL:** <https://forum.inductiveautomation.com/t/is-system-perspective-sendmessage-blocking/90242>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [May 10, 2024, 4:48pm UTC](https://forum.inductiveautomation.com/t/is-system-perspective-sendmessage-blocking/90242 "2024-05-10T16:48:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devty](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@devty](https://forum.inductiveautomation.com/u/devty)\
**Post date:** [May 10, 2024, 4:48pm UTC](https://forum.inductiveautomation.com/t/is-system-perspective-sendmessage-blocking/90242/1 "2024-05-10T16:48:46Z")

</div>

If I call one message send after another is the work form first message send guaranteed to finish before the second message sent is invoked?

or is the message handling async?

I just wonder if I don't do this right, I get race conditions?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 10, 2024, 5:16pm UTC](https://forum.inductiveautomation.com/t/is-system-perspective-sendmessage-blocking/90242/2 "2024-05-10T17:16:00Z")

</div>

> [@devty](#):
>
> If I call one message send after another is the work form first message send guaranteed to finish before the second message sent is invoked?

No

> [@devty](#):
>
> I just wonder if I don't do this right, I get race conditions?

Undoubtedly.

It is possible that there is a better way to achieve whatever it is you are attempting to achieve. Since you didn't provide that information, I don't know.

`system.util.sendRequest()` is blocking and can be used to achieve the same goals as `system.perspective.sendMessage()` that doesn't mean that messages are the right tool for the job.

Anytime that I find myself concerned about state with messages, I take a step back and reevaluate what I am doing.
