# window

**将 `Observable` 分解为多个子 `Observable`，周期性的将子 `Observable` 发出来**

![](https://4217506537-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWj545abP2yK86-qksJ%2Fsync%2Ff36b03c76da3f55713f51924db8f7c52687d9042.png?generation=1616819394391320\&alt=media)

**window** 操作符和 [buffer](https://3440217568.gitbook.io/rxswift/decision_tree/buffer) 十分相似，[buffer](https://3440217568.gitbook.io/rxswift/decision_tree/buffer) 周期性的将缓存的元素集合发送出来，而 **window** 周期性的将元素集合以 `Observable` 的形态发送出来。

[buffer](https://3440217568.gitbook.io/rxswift/decision_tree/buffer) 要等到元素搜集完毕后，才会发出元素序列。而 **window** 可以实时发出元素序列。
