Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extended semantics for defer_signal #1219

Open
jhellerstein opened this issue May 21, 2024 · 1 comment
Open

extended semantics for defer_signal #1219

jhellerstein opened this issue May 21, 2024 · 1 comment
Labels
hydroflow syntax Hydroflow's custom surface syntax

Comments

@jhellerstein
Copy link
Contributor

Based on #966

Two independent considerations here:

  • Do we empty the buffer on new input?
  • Do we empty the buffer on new signal?

The current implementation is {input: no, signal: yes}: in a tick when data arrives on the [input] port, append the new data to the contents of the buffer. On [signal], stream out a copy of whatever data is in the buffer and empty the buffer.

Three more possibilities:

{input: yes, signal: no}: in a tick when data arrives on the [input] port, replace the contents of the buffer with the new data from [input] in this tick. On [signal], stream out a copy of whatever data is in the buffer.

{input: no, signal: no}: in a tick when data arrives on the [input] port, append the contents of the buffer with the new data from [input] in this tick. On [signal], stream out whatever data is in the buffer. This is equivalent to cross_join::<'static, 'tick>.

{input: yes, signal: yes}: only produce output if the [input] and [signal] ports both have data in the current tick, producing only the [input] that arrived in this tick. This is equivalent to cross_join::<'tick, 'tick>.

Note that the first two choices replace the buffer in ways that are not equivalent to a join.

@jhellerstein jhellerstein added the hydroflow syntax Hydroflow's custom surface syntax label May 21, 2024
@MingweiSamuel
Copy link
Member

Related #1373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hydroflow syntax Hydroflow's custom surface syntax
Projects
None yet
Development

No branches or pull requests

2 participants