/src
of the container.
.run()
method blocks and waits for the function to complete, and directly returns the value returned by the function.
.push()
method returns a SieveFuture
object, which contains information about the job. You can later access the output using the .result()
method, for example. This is useful for when you are pushing several jobs at once, like when processing frames from a video. This ensures that you are not waiting for previous frames to finish processing before pushing the next ones, and are taking full advantage of parallel processing.
Note: SieveFuture
objects don’t work with traditional concurrent.futures
methods like concurrent.futures.as_completed
or concurrent.futures.wait
.
You can call both .run()
and .push()
locally, or within another Sieve function. Calling .run()
or .push()
within Sieve, allows you to chain function calls together, enabling powerful AI applications!