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

Output to support partial flush #86

Closed
asubb opened this issue Oct 12, 2020 · 0 comments
Closed

Output to support partial flush #86

asubb opened this issue Oct 12, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request lib
Milestone

Comments

@asubb
Copy link
Member

asubb commented Oct 12, 2020

Some outputs may support flushing the file earlier and starting another one as per request or some other event.

As the event should be bypassed as a part of the stream, the wrapper Managed is introduced. The Managed allows to specify the signal and data at the same time, and hence react accordingly.

data class Managed<S, T> (
  val signal: S?,
  val data: T?
)

For the output, the signal Flush would be introduced:

typealias OutputSignal Int

const val FlushSignal = 0x01

As long as the output gets the FlushSignal it flushes the current written buffer and starts the new buffer over.

Output should support the name generation strategies or use default ones.

The current candidates to support flush are wav, csv and dev-null outputs.

@asubb asubb added enhancement New feature or request lib labels Oct 12, 2020
@asubb asubb added this to the 0.3.0 milestone Oct 12, 2020
@asubb asubb self-assigned this Oct 15, 2020
@asubb asubb mentioned this issue Oct 20, 2020
@asubb asubb closed this as completed Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lib
Projects
None yet
Development

No branches or pull requests

1 participant