This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"container/list" | |
"flag" | |
"fmt" | |
"os" | |
"sync" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 Manlio Perillo. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// | |
// Package atexit implements support for running deferred functions in case of | |
// abnormal exit (in contrast to a normal exit when the program returns from | |
// the main function). | |
// | |
// Since calling os.Exit, e.g. during a signal handler, does not call deferred | |
// functions, a complementary mechanism is required when the program acquires |