aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_statem.erl
AgeCommit message (Collapse)Author
2016-10-26Log terminate to sys debugRaimo Niskanen
2016-10-26Optimize event timeoutRaimo Niskanen
Do not start an event timer unless there are no enqueued events.
2016-10-26Rework timeout handlingRaimo Niskanen
Handling of timers and timeouts has been cleaned up and generalized. Semantic change regarding state timeout zero: Previously if one state caused a state timeout zero and managed to stay in the same state to insert additional timeout zero(s) in the next state callback invocation, then there would be only one timeout zero event. The mindset was that the machine was faster then the timeout zero. This has changed with the mindset that all state callback invocations should be independent, so now the machine will get one state timeout zero event per started state timeout zero. Note that just using zero timeouts is fairly esoteric...
2016-10-24Fix doc and type for state enter callsRaimo Niskanen
2016-10-14Fix race condition in cancel_timer/1Raimo Niskanen
2016-10-13Use parameterized typesRaimo Niskanen
2016-10-12Implement state timeoutsRaimo Niskanen
2016-10-04Improve docs and typesRaimo Niskanen
2016-09-30Change state entry events into state enter callsRaimo Niskanen
2016-09-16Implement state entry eventsRaimo Niskanen
2016-09-16Implement call/3 dirty_timeoutRaimo Niskanen
2016-08-18Improve sys debugRaimo Niskanen
2016-08-17Handle exceptions in init/1 and callback_mode/0Raimo Niskanen
2016-08-17Clarify error valuesRaimo Niskanen
2016-08-10Doc fixesRaimo Niskanen
2016-07-27Rewrite gen_statem for M:callback_mode/0Raimo Niskanen
2016-07-18Fix type and template errors from bugs.erlang.org: ERL-172 and ERL-187Raimo Niskanen
2016-05-04Fix documentationRaimo Niskanen
2016-04-28Clean up terminate functionsRaimo Niskanen
2016-04-27Fix callback mode after code change not usedRaimo Niskanen
2016-04-27Restructure loop_* to clarify S handlingRaimo Niskanen
2016-04-27Fix hibernation subtletyRaimo Niskanen
2016-04-21Modify code_change/4 to return CallbackModeRaimo Niskanen
Also move check of non-atom states in callback mode state_functions to where the state function is called. This gives homogenous diagnostics for state functions, code_change/4 and system_replace_state StateFun. Irregularities pointed out by James Fish.
2016-04-12Fix missing short forms for event timeoutRaimo Niskanen
2016-03-18Do more intricate Fred Hebert doc changesRaimo Niskanen
2016-03-17Change Caller -> From as suggested by Fred HebertRaimo Niskanen
2016-03-03Rename state_timeout -> event_timeoutRaimo Niskanen
2016-03-03Fix most of the system docs and emacs modeRaimo Niskanen
2016-03-02Change code_change/4 to {ok,State,Data}Raimo Niskanen
2016-02-29Sharpen test suiteRaimo Niskanen
2016-02-29Remove the remove_event action and all alikeRaimo Niskanen
Removing events from the internal queues is not necessary with the choosen semantics of the event queue vs. hibernate. In an early implementation it was possible by combining hibernate with e.g. postpone to get an event in the queue that you would not see before processing the postponed event, and therefore should you decide to cancel a timer it was essential to be able to remove that unseen event from the queue. With the choosen semantics you will have to postpone or generate an event for it to be in the event queue, and if you e.g. postpone a timeout event and then cancel the timer it is your mistake. You have seen the event and should know better than to try to cancel the timer. So, the actions: remove_event, cancel_timer, demonitor and unlink are now removed. There have also been some cleanup of the timer handling code.
2016-02-26Relax caller() type check and cleanupRaimo Niskanen
2016-02-26Optimize postponed handlingRaimo Niskanen
2016-02-26Allow actions without containing listRaimo Niskanen
Type check atom state as early as possible
2016-02-26Implement 'keep_state_and_data' and 'stop'Raimo Niskanen
2016-02-25Remove {keep_state_and_data}Raimo Niskanen
Correct typo reported by Luïc Hoguin.
2016-02-24Type check in APIRaimo Niskanen
2016-02-24Ditch PrevStateRaimo Niskanen
StateName/4 -> StateName/3 handle_event/5 -> handle_event/4
2016-02-24Make first next_event in list arrive firstRaimo Niskanen
Define options as actions that set options, rework the documentation about this.
2016-02-24Ditch State so StateName/5 -> StateName/4Raimo Niskanen
2016-02-23Add {stop_and_reply,Reason,Replies [,Data])Raimo Niskanen
Cleanup some error handling
2016-02-23Rename Client -> CallerRaimo Niskanen
2016-02-22Make callback_option() mandatoryRaimo Niskanen
2016-02-19Hide Data in default format_status/2 if callback crashesRaimo Niskanen
2016-02-19Update terminology to data(), transition_op(), etcRaimo Niskanen
2016-02-19Add reply([Reply])Raimo Niskanen
2016-02-19Add {keep_state,...} and {keep_state_and_data,...}Raimo Niskanen
2016-02-18Change initial PrevState to 'undefined'Raimo Niskanen
2016-02-18Write some convenience helpersRaimo Niskanen
2016-02-18Rename retry -> postponeRaimo Niskanen