gen_fsm: forcing state transitions
Joel Reymont
joelr1@REDACTED
Fri Apr 15 11:01:37 CEST 2005
I apologize for the batch of messages to the list but I'm online twice a
week from the Helsinki public library. They don't have internet at the
refugee reception center so please bear with me :-)!
I have been trying to spread logic between different states with some
states being artificial if you will. Some processing will happen in such
a state and I will then force a transition to a different state. I like
this approach because it helps me keep state callbacks reasonably small
and easy to test.
I'm forcing transition thusly:
gen_fsm:send_event_after(1, collect),
{ next_state, small_blind, Data }
The intent is for the FSM to transition to the small_blind state and
receive a collect event right after.
My question is about the timeout parameter. Is 1 ms a good number for
forcing an immediate transition? Can I just use 0 or should I pick a
number greater than one?
Thanks, Joel
--
http://wagerlabs.com/tech
More information about the erlang-questions
mailing list