多说无用,直接上码
func Pop()->T?{ var result:Any? Locker.Lock() if Data.count>0 { result = Data.removeAtIndex(0) } Locker.UnLock() return result as? T }
多说无用,直接上码
func Pop()->T?{ var result:Any? Locker.Lock() if Data.count>0 { result = Data.removeAtIndex(0) } Locker.UnLock() return result as? T }