# 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/vzbvlja
GO 語言處理併發的時候我們是選擇 sync 還是 channel
以前寫 C 的時候,我們一般是都通過共享內存來通信,對於併發去操作某一塊數據時,爲了保證數據安全,控制線程間同步,我們們會去使用互斥鎖,加鎖解鎖來進行處理然而 GO 語言中建議的時候通過通信來共享內存,使用 channel 來完成臨界區的同步機制可是 GO 語言中的 channel 畢竟是屬於比較高級的原語,自然在性能上就比不上 sync 包裏面的鎖機制,感興趣的同學可以自己寫一個簡單的基準測試來 ⌘ Read more