Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Nov 11, 2025

  • Factorize some gen_server/gen_statem code into new gen module
  • Extend proc_lib to add start_monitor and use it with gen_server
  • Bump CI erlfmt to v1.7.0 (v1.1.0 and v1.7.0 only disagree on newly introduce gen module's moduledoc attribute).

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot marked this pull request as draft November 11, 2025 19:22
@pguyot pguyot force-pushed the w46/add-sys branch 3 times, most recently from 3c7032e to 3209d11 Compare November 12, 2025 07:45
- Factorize some `gen_server`/`gen_statem` code into new `gen` module
- Extend `proc_lib` to add `start_monitor` and use it with `gen_server`
- Bump CI erlfmt to v1.7.0 (v1.1.0 and v1.7.0 only disagree on newly introduce
`gen` module's moduledoc attribute).
- Remove unnecessary check in `timer_manager:maybe_start/0` as the same check
is performed in `gen_server:start/4`

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot marked this pull request as ready for review November 13, 2025 06:06
@bettio bettio merged commit d4877b9 into atomvm:main Nov 13, 2025
281 of 297 checks passed
exit(Atom);
{MonitorRef, Reply} ->
demonitor(MonitorRef, [flush]),
Reply
Copy link
Contributor

@petermm petermm Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be {ok, Reply}
https://github.com/erlang/otp/blob/47995dbaeaf2c54cf2e4e19823f4e94fe52854df/lib/stdlib/src/gen.erl#L247

%% Makes a synchronous call to a generic process.
%% Request is sent to the Pid, and the response must be
%% {Tag, Reply}.

https://github.com/erlang/otp/blob/47995dbaeaf2c54cf2e4e19823f4e94fe52854df/lib/stdlib/src/gen.erl#L208C1-L211C17

I have rebased GenServer.ex to use this call and tests are failing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants