Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce managed objects #728

Closed
wants to merge 1 commit into from
Closed

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Feb 4, 2025

Managed objects derive from parsec_object_t and provide a custom release function that can be set by the application. PaRSEC will fall back to calling free if no explicit callback is set. Managed objects are tied into the type system because PARSEC_OBJ_RELEASE must be able to distinguish them from regular objects. The most common managed object would be parsec_list_item_t as that is the basis for all container elements in PaRSEC and so we can register a release callback that stashes an object into a container from where it can be retrieved and reused later.

This is an alternative to #726 . It's less intrusive but like #726 not ABI backwards compatible but does not change the API.

@devreal devreal requested a review from a team as a code owner February 4, 2025 18:43
Managed objects derive from `parsec_object_t` and provide
a custom release function that can be set by the application.
PaRSEC will fall back to calling `free` if no explicit callback is set.
Managed objects are tied into the type system because `PARSEC_OBJ_RELEASE`
must be able to distinguish them from regular objects.
The most common managed object would be `parsec_list_item_t` as that is
the basis for all container elements in PaRSEC.

Signed-off-by: Joseph Schuchart <[email protected]>
@abouteiller
Copy link
Contributor

We did #731 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants