[Bug 789843] API: GstPromise - object with promise/future-like semantics

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Nov 20 09:44:24 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=789843

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #364028|none                        |reviewed
             status|                            |

--- Comment #9 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 364028:
 --> (https://bugzilla.gnome.org/review?bug=789843&attachment=364028)

Only a short review, generally looks fine to me though

::: 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?

::: 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?

@@ +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

-- 
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