Skip to content

Commit 79f670d

Browse files
committed
Remove dead worker_recv/2 code from py_nif.erl
Removed worker_recv/2 function that was declared in Erlang but had no corresponding C NIF implementation.
1 parent 044f78d commit 79f670d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
- Added NULL checks on all `enif_alloc_resource` and `enif_alloc_env` calls
3838
- **Dialyzer warnings** - Added `{suspended, ...}` return type to NIF specs for
3939
`worker_call`, `worker_eval`, and `resume_callback` functions
40+
- **Dead code removal** - Cleaned up unused code discovered during code review:
41+
- Removed `execute_direct()` function in `py_exec.c` (duplicated inline logic)
42+
- Removed unused `ref` field from `async_pending_t` struct in `py_nif.h`
43+
- Removed `worker_recv/2` from `py_nif.erl` (declared but never implemented in C)
4044

4145
### Documentation
4246

src/py_nif.erl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
worker_eval/4,
3434
worker_exec/2,
3535
worker_next/2,
36-
worker_recv/2,
3736
import_module/2,
3837
get_attr/3,
3938
version/0,
@@ -175,12 +174,6 @@ worker_exec(_WorkerRef, _Code) ->
175174
worker_next(_WorkerRef, _GeneratorRef) ->
176175
?NIF_STUB.
177176

178-
%% @doc Wait for a message in the worker loop.
179-
%% Releases the GIL while waiting.
180-
-spec worker_recv(reference(), timeout()) -> {ok, term()} | timeout | {error, term()}.
181-
worker_recv(_WorkerRef, _TimeoutMs) ->
182-
?NIF_STUB.
183-
184177
%%% ============================================================================
185178
%%% Module Operations
186179
%%% ============================================================================

0 commit comments

Comments
 (0)