코드 정리 및 websocket도 http와 비슷하게 api handler로 통일

This commit is contained in:
2023-09-08 11:35:57 +09:00
parent eb54fa2e3a
commit 6cbf32c386
10 changed files with 216 additions and 130 deletions

View File

@ -33,13 +33,6 @@ func (c *consumer_common[T]) add_internal(sk storagekey, si T) {
delete(c.stages[1].deleted, sk)
}
func (c *consumer_common[T]) add(sk storagekey, si T) {
c.lock.Lock()
defer c.lock.Unlock()
c.add_internal(sk, si)
}
func (c *consumer_common[T]) delete_internal(sk storagekey) {
delete(c.stages[0].cache, sk)
c.stages[0].deleted[sk] = true