Exactly the same API On 15 May 2016 at 18:13, Michał Muskała <[email protected]> wrote:
> 2016-05-15 17:06 GMT+02:00 Peter Hamilton <[email protected]>: > > One nitpick. Merge arg and state in the return in init. Having them > separate > > is confusing. Delayed init takes one parameter and returns a new state. > What > > happens to the originally returned state? > > > > It was my intention to have delated_init/2 function taking the > argument and state as arguments. Thank you for pointing that out. > > On Sun, May 15, 2016, 7:23 AM James Fish <[email protected]> wrote: > > > > I think the larger problem being tackled here is that current OTP > > behaviours require the callbacks to be purely message based and do not > make > > it easy to dispatch internal events. Have you looked at :gen_statem in > OTP > > 19 rc1? I think it solves this problem quite well, or at least I have not > > seen something I think is better. Once OTP 19 lands I'll release > > :gen_connection which is :connection but using a :gen_statem instead of a > > :gen_server. It simplifies the code enormously and works better with OTPs > > logging and debugging features. It might be that you want to propose > > including GenStatem instead of a delayed init. > > I have to admit, I haven't looked into gen_statem before. Now that I > have, I can see some overlap in the things it offers and my proposal, > especially the ability to call `enter_loop` by hand. My main use case > of this feature was offering a custom gen_server-like behaviours, so > I'm fine with that level of detail to handle in a lib. > Do you intend to keep the gen_server like interface for gen_connection > or rather migrate to something more similar to gen_statem? > > Michał. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAGAFNpkburfxg7b6i6UUL35ZCF4X3xL5ZC%2BoC2HH5apOSo6Zcw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CA%2BibZ99%3D0HZtbqugVWWVdUuKYDuk7KkaeShsori23T78ok89dA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
