huijeong-kim / huijeong-kim.github.io

https://huijeong-kim.github.io
5 stars 0 forks source link

post/2022-08-27-actix-actor-async-ctx-2/ #3

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Actix actor의 AsyncContext 활용하기 (2) – my-dev-note –

지난 글에 이어 Actix actor의 AsyncContext 함수를 사용하는 방법을 알아봅니다.

http://huijeong-kim.github.io/2022/08/27/actix-actor-async-ctx-2/

yyu-nim commented 2 years ago

message stream 을 쓰고 싶은 경우는 언제일까요?? sender 가 message 대신 message stream을 준다는 것일지 아니면 sender는 stream 설정만 해주고, receiver (혹은 receiver의 context)가 stream에서 알아서 message를 하나씩 처리한다는 개념일까요??

huijeong-kim commented 2 years ago

Message를 연속적으로 보낼 때 별도의 stream을 열어 두는 느낌인데,, 욧,,,, (Stream) 아주 얕게 코드를 구경했을 땐 기존의 actor message는 context의 poll 함수에서 실행되는데, stream을 만드는 경우에는 별도의 poll 함수가 돌아가는 것 .. 같습니다.

이 부분은 제가 공부가 더 필요하고 적절한 actor 사용 예제를 찾지 못해서 다음에 따로 적으려고 했었는데, 더 알게 되면 다시 공유드리겠습니다 ㅎㅎ 😁

yyu-nim commented 2 years ago

넵 감사합니다! 나중에 Stream 포스팅도 기대하겠습니다 ㅎ