examples: add run_once to before_fork hook example
commit3318b070c6513a3baa7ce7ac26f4835f46ccff1f
authorEric Wong <e@80x24.org>
Sat, 4 Oct 2014 02:14:21 +0000 (4 02:14 +0000)
committerEric Wong <e@80x24.org>
Sat, 4 Oct 2014 02:14:21 +0000 (4 02:14 +0000)
treedf4f4576b41bcfe557919af9d9c055b53ac3c5e1
parent4b2782a926d8f131b1e7382be35e3abb77bf4be5
examples: add run_once to before_fork hook example

There may be code in a before_fork hook which should run only once,
document an example using a guard variable since it may not be
immediately obvious to all users.

Inspired-by: BrĂ¡ulio Bhavamitra <braulio@eita.org.br>
http://bogomips.org/unicorn-public/m/20141004015707.GA1951@dcvr.yhbt.net.html
examples/unicorn.conf.rb