Closed korvyr closed 3 years ago
This repo is only meant to be an introductory example on how to do this. I don't want to add or change any features or how it works. I'd recommend making a fork or your own version of this code and then applying this to that for your use.
This is running quite well on my own project.
It lets one send false to the stop channel to see if a stream is currently running without killing it, while still being able to send true to the stop channel to kill it:
and
This is very useful if you want to create a queue or the like and not override a current stream with new requests.
If anyone is interested in a full working queue using this, ping me and I can send you some snippets. My example is too integrated in my own project to copy/paste alone.