0

PureMVC / ActionScript で、send Notification または notify-observer を使用して通知を送信した後、すべてのオブザーバーが通知を受信して​​作業を完了したことを確認するにはどうすればよいですか?

つまり、sendNotification が同期されます。

ありがとう

4

1 に答える 1

1

As far as I know, the proper way to do this is to put all of your tasks in SimpleCommands, and then add all of these to a single MacroCommand. As long as the SimpleCommands are synchronous (eg, you don't start any load processes), when the MacroCommand finished, you are guaranteed that all of the SimpleCommands in it have finished.

You may also want to investigate the AsyncCommand utility. I am not a huge fan of this, but some of my colleagues like it.

于 2011-06-02T01:40:42.500 に答える