GenStageを使ってバックプレッシャーを効かせて並列数を制限しながら非同期処理を実行する実装例
mix deps.get
(本当はPhoenix関係ないんだけど。。。Elixirよくわからないまま試行錯誤していたので。。。すまぬ)
docker compose up
iex -S mix
iex(1)> Hello.Test.run :cast
To start your Phoenix server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix