From 0842cce7762e79e9b206ab25a8ebf5f4aed21f5d Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 13 Apr 2024 18:44:04 +0800 Subject: [PATCH] 1 --- server/mailserver/mail/mail.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/mailserver/mail/mail.go b/server/mailserver/mail/mail.go index 689d2fce..79b4ac2c 100644 --- a/server/mailserver/mail/mail.go +++ b/server/mailserver/mail/mail.go @@ -2,6 +2,7 @@ package mail import ( "f5" + "sync" //"main/common" //"main/constant" //"q5" @@ -14,6 +15,7 @@ type attachment struct { } type mail struct { + lock sync.Mutex mailId int64 mailType int32 subject string @@ -31,6 +33,14 @@ func (this *mail) init() { } +func (this *mail) Lock() { + this.lock.Lock() +} + +func (this *mail) Unlock() { + this.lock.Unlock() +} + func (this *mail) loadFromDb(ds *f5.DataSet) { }