[Bug 789843] API: GstPromise - object with promise/future-like semantics
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Nov 20 12:37:19 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=789843
--- Comment #10 from Matthew Waters (ystreet00) <ystreet00 at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #9)
> ::: gst/gstpromise.c
> @@ +334,3 @@
> + * @user_data: (closure): argument to call @func with
> + * @notify: notification function that @user_data is no longer needed
> + *
>
> Maybe write somewhere what the use-case of this is? I assume it's for users
> of promises to implement asynchronous handling of promises (instead of
> blocking wait()), and e.g. chain promises to each other?
Ok.
> ::: gst/gstpromise.h
> @@ +36,3 @@
> + * @GST_PROMISE_RESULT_INTERRUPTED: Interrupted by the consumer
> + * @GST_PROMISE_RESULT_REPLIED: A producer marked a reply
> + * @GST_PROMISE_RESULT_EXPIRED: The promise expired (the carrying object
> lost all refs)
>
> What's the carrying object? How do interrupted and expired differ,
> interrupted is caused by the consumer of the promise and expired by the
> producer?
e.g. sending a GstMessage, or on some other parent (or carrying) object where
task-like semantics are enforced e.g. GstBus. Expired means that that object
has been destroyed and so the promise will never be fulfilled. Interrupted
means that the waiter doesn't want/need the value anymore.
> @@ +45,3 @@
> + GST_PROMISE_RESULT_INTERRUPTED,
> + GST_PROMISE_RESULT_REPLIED,
> + GST_PROMISE_RESULT_EXPIRED,
>
> It might be good to also add an ERROR case here, and allow to get/pass a
> GError in that case. Everything can fail
I don't believe any of the promise functionality has the potential to fail
without a warn/critical. Did you have a specific case in mind where this is
not the case?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list