# 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/jp374za
深入理解 Golang 併發工具 - Singleflight
前言--前段時間在一個項目裏使用到了分佈式鎖進行共享資源的訪問限制,後來瞭解到 Golang 裏還能夠使用 singleflight 對共享資源的訪問做限制,於是利用空餘時間瞭解,將知識沉澱下來, 並做分享文章儘量用通俗的語言表達自己的理解,從入門 demo 開始,結合源碼分析 singleflight 的重點方法,最後分享 singleflight 的實際使用方式與需要注意的 “坑 “。另外需注 ⌘ Read more