# 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/5vfbpoa
Golang 可重入鎖的實現**
項目中遇到了可重入鎖的需求和實現,具體記錄下。爲什麼需要可重入鎖---------我們平時說的分佈式鎖,一般指的是在不同服務器上的多個線程中,只有一個線程能搶到一個鎖,從而執行一個任務。而我們使用鎖就是保證一個任務只能由一個線程來完成。所以我們一般是使用這樣的三段式邏輯:Lock();DoJob();Unlock();但是由於我們的系統都是分佈式的,這個鎖一般不會只放在某個進程中,我們會借用第 ⌘ Read more