Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 89429d1

Browse files
author
Zhang Jun
committed
tiny refine
1 parent a29ab8b commit 89429d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎client-go/2.queue-fifo-delta_fifo.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ type Queue interface {
2828

2929
## FIFO 实现了 Queue/Store 接口
3030

31-
FIFO 类型实现了 Queue/Store 接口(FIFO 是一个 struct 类型,而非接口),所以是一个先入先出(FIFO)的对象缓存
31+
FIFO 类型(struct 类型,非接口)实现了 Queue/Store 接口,对象被 Pop 的顺序与加入的顺序一致,所以是先入先出(FIFO)。
3232

33-
对象被 Pop 的顺序与加入的顺序一致,所以是先入先出。但是位于 FIFO 中的某个对象在没有被 Pop 前,如果有多次对它的 `Add/Update()` 操作,FIFO 只会缓存它的最新值,而且该对象只会被 Pop 一次。
33+
但是位于 FIFO 中的某个对象在没有被 Pop 前,如果有多次对它的 `Add/Update()` 操作,FIFO 只会缓存它的最新值,而且该对象只会被 Pop 一次。
3434

3535
例如 FIFO 中对象 A 的值为 a1,在被 Pop 前,两次更新值分别为 a2, a3,则 Pop 只会返回最新值 a3。
3636

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /