# nifwait **Repository Path**: mirrors_basho/nifwait ## Basic Information - **Project Name**: nifwait - **Description**: Utility to test effect of blocking NIFs on Erlang scheduler - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Utility to test effect of blocking NIF on Erlang scheduler. Test spawns several processes, all which will start in the run queue of the current scheduler. Each spawned process then calls `usleep` from within a NIF, sleeping for configurable duration. After the sleep, the processes then performs a pure Erlang busy wait, looping for configurable number of iterations. Process then exits. Each process periodically prints out the Erlang run queues as well as the number of reductions performed by the process. Compile with rebar: `rebar compile` Run Erlang: `erl -pa ebin` Use: ```erlang %% wait:run(N, W, R, BW) %% N = number of spawned procs %% W = microseconds spent waiting in NIF %% R = number of repeat calls to NIF %% BW = iterations of pure Erlang busy wait %% Example: wait:run(100,300000, 5, 10000). ```