From 1210489f76089da9b1f4895fc12af4f9cf318f2b Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Tue, 19 Sep 2017 16:11:06 -0500 Subject: [PATCH] frame rowlabel and options read-only lock --- frame.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frame.go b/frame.go index 2fcb0c47d..d52cb8fe1 100644 --- a/frame.go +++ b/frame.go @@ -166,9 +166,9 @@ func (f *Frame) SetRowLabel(v string) error { // RowLabel returns the row label. func (f *Frame) RowLabel() string { - f.mu.Lock() + f.mu.RLock() v := f.rowLabel - f.mu.Unlock() + f.mu.RUnlock() return v } @@ -217,8 +217,8 @@ func (f *Frame) CacheSize() uint32 { // Options returns all options for this frame. func (f *Frame) Options() FrameOptions { - f.mu.Lock() - defer f.mu.Unlock() + f.mu.RLock() + defer f.mu.RUnlock() return f.options() }