Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Use the wf:comet function as a gen_server

#65

In nitrogen 1, I was able to turn the fun that's the argument to wf:comet/1 into a gen_server, like this:

State = #state{...},
wf:comet(fun() ->
             gen_server:enter_loop(?MODULE, [], State)
         end).

Nitrogen 2.x doesn't let me do that anymore, because the fun inside the comet loop is not started inside a proc_lib hierarchy.
I really appreciate it if I could do what's shown above because my comet function do behave as a gen_server and it's a pitty that I can not use gen_server:call/2 and gen_server:cast/2 to send messages to it.

Thanks.

Reported by Fernando "Brujo" Benavides · May 19th, 2010 @ 11:14 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Rusty Klophaus
  2. Rusty Klophaus
    Rusty Klophaus
    • Milestone cleared.
    • Milestone order changed from 0 to 0

    June 29th, 2010 @ 08:00 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.