Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| defmodule DrainStop do | |
| @moduledoc """ | |
| DrainStop Attempts to gracefully shutdown an endpoint when a normal shutdown | |
| occurs. It first shuts down the acceptor, ensuring that no new requests can be | |
| made. It then waits for all pending requests to complete. If the timeout | |
| expires before this happens, it stops waiting, allowing the supervision tree | |
| to continue its shutdown order. | |
| DrainStop should be installed in your supervision tree *after* the | |
| EndPoint it is going to drain stop. |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| defmodule P101 do | |
| def last([]), do: nil | |
| def last([h]), do: h | |
| def last([h|t]), do: last(t) | |
| end |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |