Result of task invocation on a grain in Orleans

萝らか妹 提交于 2019-12-02 08:18:48

First Part
No, there is no blocking when a call to a grain is made. This post further clears what happens when a grain call is made.

Second Part
While it is correct that grains are single threaded, it is wrong to assume that every grain has its own thread in Orleans. As @Tseng says Orleans uses the async feature of .NET Core. It will process a grain until an async operation happens. Then it returns the thread to the thread-pool. This thread can be used by another grain to process data until the async operation is complete. When its complete, it resumes. its not necessary the same thread (but its the same context). The first grain is blocking the thread giving no chance for the second grain to execute.

Thanks Tseng and Reuben Bond for making things clear.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!