-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Remove source.{dump, drop}
, add request.{dump, process}
.
#4216
Conversation
7f0e7b9
to
ce389e5
Compare
ce389e5
to
4e74360
Compare
2f7a615
to
2896698
Compare
c6739e2
to
5266c0a
Compare
5266c0a
to
e993372
Compare
@toots . I'll report if anything unintended occurs. |
Awesome! |
This PR replaces the
source.{dump, drop}
mechanism with a safer one based on requests.Now that these operators are being used more widely, via replaygain and autocue computations, it is clear that we need a better control over the potential for success before launching a CPU-burn clock on the underlying source.
With this PR, we introduce a new
request.{dump, drop}
set of operators that take a request and an optional processing function. From the request, a source is created usingrequest.dynamic
and passed to the process function.Then, before starting, the request source checks if the request can produce a decoder for its given content-type. If not, the processing is aborted right away. If it can, chances are pretty high that processing will sucesfully begin and terminate.
This makes these operators fully synchronous with no need for a special queue. They can also be launched from the CLI and terminate right away.
Lastly, the old
source.{dump, drop}
is make possible via the export ofclock.tick
. In this case, advanced users can implement the behavior if they know what they are doing: