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

验证回执