第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Go 中函數(shù)的通道返回類型中的 `<-` 是什么意思?

Go 中函數(shù)的通道返回類型中的 `<-` 是什么意思?

Go
有只小跳蛙 2023-08-14 14:57:27
我想知道<-Go 中函數(shù)的通道返回類型意味著什么。事實上,類型 T 的通道被寫為chan T并使用 來創(chuàng)建make(chan T, N),那么 的<-返回類型中的“”意味著什么time.After?go doc time.Afterpackage time // import "time"func After(d Duration) <-chan Time    After waits for the duration to elapse and then sends the current time on    the returned channel. It is equivalent to NewTimer(d).C. The underlying    Timer is not recovered by the garbage collector until the timer fires. If    efficiency is a concern, use NewTimer instead and call Timer.Stop if the    timer is no longer needed.獎金:我如何看出go doc這time.After是異步的并且在持續(xù)時間過去之前不會阻塞?
查看完整描述

1 回答

?
忽然笑

TA貢獻1806條經(jīng)驗 獲得超5個贊

返回時間值的只讀<-chan time通道的方法。After

Achan time是讀寫通道。

獎金:

你是對的。文檔不夠清晰。你必須從簽名中猜測出來。

你也許可以建議一個更好、更明確的描述After。Go 是一個開源項目,這將是一個做出貢獻的機會。


查看完整回答
反對 回復 2023-08-14
  • 1 回答
  • 0 關注
  • 128 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號