[erlang-questions] card game about gen_fsm how to

Anders Nygren <>
Wed May 28 20:04:47 CEST 2008


2008/5/28 wenew zhang <>:
> Dear All,
>     i used a gen_fsm in a cards game, when  gen_fsm-server in one status
> ,(just like 'SEND_CARDS'),of course,the gen_fsm hold many status like this,
> but whichever status the gen_fsm in, the client can send a force quit
> message to interrupt the current status,
> i have more than ten status,need i write ten+ quit message process in each
> status to fix this problem?
>
> that's very boring
>
> any simple solution to fix this?
>

use gen_fsm:send_all_state_event

and handle it in the handle_event/3 callback

/Anders

> tks
>
> wenew zhang
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list