aboutsummaryrefslogtreecommitdiff
path: root/messagepool.go
diff options
context:
space:
mode:
Diffstat (limited to 'messagepool.go')
-rw-r--r--messagepool.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/messagepool.go b/messagepool.go
deleted file mode 100644
index 194d721..0000000
--- a/messagepool.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2018, Shulhan <ms@kilabit.info>. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package rescached
-
-import (
- "sync"
-
- "github.com/shuLhan/share/lib/dns"
-)
-
-var _messagePool = sync.Pool{
- New: func() interface{} {
- return dns.NewMessage()
- },
-}
-
-//
-// freeMessage put the message back to the pool.
-//
-func freeMessage(msg *dns.Message) {
- _messagePool.Put(msg)
-}