CodeSampleX

サンプル

Prove that NimblePool.handle_info/2 is a per-worker callback that receives (message, worker_state) and must return {:ok, new_worker_state}, not the GenServer shape {:noreply, state}, and that the wrong return shape crashes the entire pool process

sha256:ec43ae78494ff75d23b2417d7e41cc6b8801332bc159de9e2ef4a53701029f3f

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Prove that NimblePool.handle_info/2 is a per-worker callback that receives (message, worker_state) and must return {:ok, new_worker_state}, not the GenServer shape {:noreply, state}, and that the wrong return shape crashes the entire pool process HOW
パッケージ
nimble_pool 1.1.0
環境
elixir
作成日
2026-08-17T01:39:47Z

よくある思い込み

NimblePool.handle_info/2 follows the same return convention as GenServer.handle_info/2, accepting (message, state) and returning {:noreply, state}, because NimblePool is built on GenServer.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート