Dear all,

Is there anything that I should be aware of if using fork() in a dancer
application?

I have some cache update code which can take a while to run, so I'd rather do it
in the background. I've therefore done something like this:

    post '/data' => sub {
        my $template = ...;
        fork and return $template;
        update_cache;
        exit;
    }

The actual code is in a module, but you get the idea.

Thanks,

Andy

_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to