I’m curious to know something… if the first of two actions is action-sendmessage, is it possible for the second action to start before the message sent by the first action is completed?
For example, let’s say we have a <$linkcatcher>
widget that stores the “navigateTo” in a tiddler $:/state/my/target
, but only if it meets some condition.
<$action-sendmessage $message="tm-navigate" navigateTo=<<target>> />
<$action-setfield $field="success" $value={{{ [{$:/state/my/target}match<target>then[yes]else[no]] }}} />
Note that the second action essentially sets the field “success” to “yes” if the tiddler $:/state/my/target
successfully gets the value of <<target>>
stored in it from the first action. It is intended to determine the linkcatcher’s decision on whether to store the value or not.
Is this a possible race condition? Is it possible that the second action could be run before the linkcatcher handles the message?
Further, if the linkcatcher runs several actions of its own, will they all be completed prior to the above setfield action getting started?
(Yes, I ask because I am in fact looking to write an action string that begins with a message and depends on the message being completely handled for the rest of the actions to be run correctly. I am thinking of trying to devise tests, but by nature of race conditions, it’s hard to tell of the test passed because there’s no race condition, or because you got lucky.)