# 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/nf37cvq
Go 併發控制 Wait - Cancel
Wait 和 Cancel 兩種併發控制方式,在使用 Go 開發服務的時候到處都有體現,只要使用了併發就會用到這兩種模式。在 Go 語言中,分別有 sync.WaitGroup 和 context.Context 來實現這兩種模式。sync.WaitGroup 等待多個線程完成對於要等待 n 個線程完成後再進行下一步的同步操作的做法,使用 sync.WaitGroup 來等待一組事件:func m ⌘ Read more