-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://yyu-nim.github.io/actix/rust/recipient/actor/2022/07/31/actix-recipient-usage.html #3
Comments
코멘트 달 수 있습니다! |
예제 보다가 궁금한 점이 있는데요, system 안에서 actor의 동작 (block_on (async)) 을 수행하면, 이 안에 있는 코드들이 한 번 끝까지 다 수행 된 후에, 이 들이 보낸 메시지들이 각 actor에서 수행되는 것 같은데, 그럼 반복적인 코드 수행은 어떻게 하는 건가요? 추가적인 코드 수행. 예를 들면, 이 예제에서 change path와 io request를 계속해서 수행하고 싶다면요. |
일단
정도가 일단 생각납니다 ㅎ 각각에 대해서 나중에 예제 코드도 생각해봐야 할 것 같습니다. 이 중 1번이 제일 단순할 수 있을 것 같은데, TestDriver 라는 actor를 하나 만들어서 무한 loop을 돌면서 |
test driver 랑 생성된 다른 actor들이 계속 ping pong 할 수 있게 해보고 싶은데 아직 어렵네요 ㅋ loop를 쓰니까 그 loop를 탈출하기 전까지 다른 actor들이 메세지 fetch를 아예 못하고.. 알려주신 링크로 일단 시도해 보겠습니다 🙉 |
1번에 공유해주신 예제가 딱 제가 원하던 거였네요. 많은 도움이 됐습니다. 통곡의 벽을 하나 넘었네요 ㅋㅋ |
actix <5> - recipient vs. addr | Your awesome title
Actix에서 actor에게 메시지를 보낼 때, 두 종류의 addressing을 사용할 수 있다. 한 가지는 Addr 이고, 다른 한 가지는 Recipient 이다. 둘 모두
do_send
,send
를 사용하여 메시지를 보내기 때문에 유사해 보이는데, 결정적인 차이는, Addr의 generic type "T"는 actor type이 들어가고, Recipient의 generic thttps://yyu-nim.github.io/actix/rust/recipient/actor/2022/07/31/actix-recipient-usage.html
The text was updated successfully, but these errors were encountered: