Age | Commit message (Collapse) | Author |
|
* solvip/stdlib/gen_statem/export-start-types:
Create a gen_statem type for enter_loop options
gen_statem exports types related to starting & naming
|
|
|
|
This was not a compiler optimization that misfired, rather that
the code neede separate case clauses for when the timer was
running and not, so to not call erlang:cancel_timer/1 nor
maps:remove/2 in the case clause where only
a map update was needed before recursion.
See the comment in loop_timouts_cancel/13
|
|
|
|
The common subexpression optimization accidentally caused
unnecessary spilling of live registers. A rather ugly
workaround can be found in loop_timeouts_cancel.
|
|
This strategy improves speed benchmarks and reduces the
amount of garbage that is produced.
More:
* Handle transition options as loop function arguments instead
of in a record.
* Shorten the state_enter loop and make it more efficient
by making it more part of the loop and less a loop restart.
* Simplify the internal timeout action handling somewhat.
|
|
|
|
* Use synchronolus cancel_timer since that is more efficient
than asynchronous when a process cancels its own timer
* Restructure the state to have fewer fields by breaking
out practically constant fields into a separate
loop argument record #params{}, group state and data
into one field and dito for timer fields
* Optimize engine loop arguments for staying in the loop so
the detour to sys:handle_system_message/6 will require
packing/unpacking of the sys: state, and of the argument Parent
* Avoid double reverse of event queue in many cases
* Restructure the state transition to not have duplicate
tracks for sys_debug and non-sys_debug cases
* Shortcut the empty list case where possible
* Loop unroll reversal of up to 2-element lists to avoid calling
lists:reverse/2 since an external call spills all live
registers to the stack
* Bring out the callback mode check to the engine loop
|
|
Currently, a user of gen_statem cannot use gen_statem types
related to naming & starting in their behaviour implementations
As an example, we cannot do:
-spec start_link(Options) -> gen_statem:start_ret() when
Options :: some_complex_thing().
start_link(Options) ->
gen_statem:start_link(?MODULE, [Opts], []).
As dialyzer, if configured to complain about unknown types, will
warn that the type gen_statem:start_ret() is unknown.
Likewise, for the same reason, we cannot do:
-spec do_call_to_gen_statem(ServerRef) -> Reply when
ServerRef :: gen_statem:server_ref(),
Reply :: term().
do_call_to_gen_statem(ServerRef) ->
gen_statem:call(ServerRef, do_thing).
This fixes that by exporting the appropriate types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* raimo/stdlib/gen_statem-dev/OTP-14015:
Show state changes in sys:trace
|
|
|
|
|
|
These are replaced by new config handling and must not be used any
more.
|
|
|
|
|
|
|
|
* maint:
Updated OTP version
Update release notes
Update version numbers
ssh: Fix bad spec for double_algs() in ssh.hrl
Test event insert from init
Fix init to allow all actions
Conflicts:
OTP_VERSION
|
|
|
|
as workarounds to avoid blocking auto-connect,
which is now asynchronous in OTP-21.
Also changed old catch to more efficient try-catch.
|
|
|
|
Conflicts:
lib/stdlib/src/gen_statem.erl
|
|
|
|
RaimoNiskanen/raimo/stdlib/gen_statem-clean_timeout-infinity/OTP-13073
Change gen_statem:call(_, _, {clean_timeout,infinity}) to use proxy
|
|
|
|
|
|
This is now ok since sys opens the debug file with encoding utf8.
Conflicts:
lib/stdlib/src/gen_server.erl
|
|
|
|
The postponed events, the user state and data, and the error
reason are all limited in error events (if the Kernel variable
error_logger_format_depth is set).
|
|
in case of active timers exists.
Added unit tests for hibernate_after functionality combined with gen_statem timers.
|
|
It was done because "hibernate_after" option already used in ssl for the same reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Handle the event timer more like other timers and do not optimize
the odd case of combining an event timeout with inserting
custom events, wich by definition cancels the event timeout.
|
|
|
|
|