Skip to content

Conversation

petrosagg
Copy link
Contributor

Did a few spelling and grammar fixes while going through the docs and also updated all links to use the new link-to-item markdown syntax.

The heart of the logic lies in the closure that binds `input` and `output`. These two are handles respectively to the operator's input (from which it can read records) and the operator's output (to which it can send records).

The input handle `input` has one primary method, `next`, which may return a pair of timestamp and batch of data. Rust really likes you to demonstrate a commitment to only looking at valid data, and our `while` loop does what is called deconstruction: we acknowledge the optional structure and only execute in the case the `Option` variant is `Some`, containing data. The `next` method could also return `None`, indicating that there is no more data available at the moment. It is strongly recommended that you take the hint and stop trying to read inputs at that point; timely gives you the courtesy of executing whatever code you want in this closure, but if you never release control back to the system you'll break things (timely employs ["cooperative multitasking"](https://en.wikipedia.org/wiki/Cooperative_multitasking)).
The input handle `input` has one primary method, `next`, which may return a pair of timestamps and a batch of data. Rust really likes you to demonstrate a commitment to only looking at valid data, and our `while` loop does what is called deconstruction: we acknowledge the optional structure and only execute in the case the `Option` variant is `Some`, containing data. The `next` method could also return `None`, indicating that there is no more data available at the moment. It is strongly recommended that you take the hint and stop trying to read inputs at that point; timely gives you the courtesy of executing whatever code you want in this closure, but if you never release control back to the system you'll break things (timely employs ["cooperative multitasking"](https://en.wikipedia.org/wiki/Cooperative_multitasking)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is this is not correct. It is a pair of a timestamp and a batch of data. Strictly speaking, it is a pair of a capability (a Capability<Timestamp>, for linking purposes) and a batch of data. None of this is on you, though. I can clean it up in post if you prefer!

@frankmcsherry
Copy link
Member

Seems good, thanks! I left one comment that you can take/leave (I'll patch it up afterwards if you'd rather not).

@petrosagg
Copy link
Contributor Author

@frankmcsherry you're right, I missed that. I just pushed a fix for that

@frankmcsherry
Copy link
Member

Thanks very much (and thanks for checking the actual type; oops!).

@frankmcsherry frankmcsherry merged commit 6d1cca4 into TimelyDataflow:master Nov 22, 2020
@github-actions github-actions bot mentioned this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants