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

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?

No

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.

5 Likes