mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-26 08:18:22 +00:00
design/relations: add missing markup to function calls
This commit is contained in:
parent
4ad714aa5c
commit
ffd53770c0
|
@ -110,21 +110,21 @@ after parent updates ref_pointer to child.
|
||||||
```
|
```
|
||||||
|
|
||||||
- only one parent is able to \_sink the same object because the
|
- only one parent is able to \_sink the same object because the
|
||||||
\_set\_parent() method is atomic.
|
`_set_parent()` method is atomic.
|
||||||
|
|
||||||
- since only one parent is able to \_set\_parent() the object, only
|
- since only one parent is able to `_set_parent()` the object, only
|
||||||
one will add a reference to the object.
|
one will add a reference to the object.
|
||||||
|
|
||||||
- since the parent can hold multiple references to children, we don’t
|
- since the parent can hold multiple references to children, we don’t
|
||||||
need to lock the parent when locking the child. Many threads can
|
need to lock the parent when locking the child. Many threads can
|
||||||
call \_set\_parent() on the children with the same parent, the
|
call `_set_parent()` on the children with the same parent, the
|
||||||
parent can then add all those to its lists.
|
parent can then add all those to its lists.
|
||||||
|
|
||||||
> Note: that the signal is emitted before the parent has added the
|
> Note: that the signal is emitted before the parent has added the
|
||||||
> element to its internal data structures. This is not a problem
|
> element to its internal data structures. This is not a problem
|
||||||
> since the parent usually has his own signal to inform the app that
|
> since the parent usually has his own signal to inform the app that
|
||||||
> the child was reffed. One possible solution would be to update the
|
> the child was reffed. One possible solution would be to update the
|
||||||
> internal structure first and then perform a rollback if the \_set_parent()
|
> internal structure first and then perform a rollback if the `_set_parent()`
|
||||||
> failed. This is not a good solution as iterators might grab the
|
> failed. This is not a good solution as iterators might grab the
|
||||||
> 'half-added' child too soon.
|
> 'half-added' child too soon.
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ parent can then add all those to its lists.
|
||||||
parent so it cannot be disposed. The parent will use its internal
|
parent so it cannot be disposed. The parent will use its internal
|
||||||
data structures to locate the child element and will return a
|
data structures to locate the child element and will return a
|
||||||
reference to it with an incremented refcount. The requester should
|
reference to it with an incremented refcount. The requester should
|
||||||
\_unref() the child after usage.
|
`_unref()` the child after usage.
|
||||||
|
|
||||||
* destroying the parent-child relationship
|
* destroying the parent-child relationship
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue