You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pipeline object is managed using a context with a cancel function and a wait group. This setup is strange.
Rather than managing the process internal to the pipeline, Start() should be renamed to Run(), and Run() should be blocking. If the context is cancelled Run() can call Stop() automatically.
The caller would then use a waitgroup and run the pipeline in a go-routine if it wants to. Run() could also return the error directly rather than implementing setError and Error.
The text was updated successfully, but these errors were encountered:
Subject of the issue
The pipeline object is managed using a context with a cancel function and a wait group. This setup is strange.
Rather than managing the process internal to the pipeline,
Start()
should be renamed toRun()
, andRun()
should be blocking. If the context is cancelledRun()
can callStop()
automatically.The caller would then use a waitgroup and run the pipeline in a go-routine if it wants to.
Run()
could also return the error directly rather than implementingsetError
andError
.The text was updated successfully, but these errors were encountered: