What is the difference between message-passing and method-invocation?

后端 未结 5 936
盖世英雄少女心
盖世英雄少女心 2021-02-02 07:51

Is there a difference between message-passing and method-invocation, or can they be considered equivalent? This is probably specific to the language; many languages don\'t suppo

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-02 08:19

    Is there a difference between message-passing and method-invocation, or can they be considered equivalent?

    They're similar. Some differences:

    Messages can be passed synchronously or asynchronously (e.g. the difference between SendMessage and PostMessage in Windows)

    You might send a message without knowing exactly which remote object you're sending it to

    The target object might be on a remote machine or O/S.

提交回复
热议问题