# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/75vg7da
Go 併發可視化解釋 - Semaphore
在這個系列的最後兩篇文章中,我們討論了來自sync包的Mutex和RWMutex。當我們希望只有一個 Goroutine 能夠獨佔地訪問共享數據時,這兩個結構非常有用。然而,在現實生活中,有些用例需要允許多個用戶同時訪問共享資源。這個數量可以很大,也可以很小,但必須始終是有限的。例如,一個容納 60000 人的體育場在任何時候都不應容納超過這個數量的人。或者,在機場,無論乘客隊列有多長,同時允許辦 ⌘ Read more