NAME ^

classes/sharedref.pmc - Shared PMC Reference

DESCRIPTION ^

The vtable functions for the SharedRef base class.

This class wraps locking around PMC access.

All methods not present below get a default body autogenerated inside Parrot::Pmc2c.

Currently all access is locked. When we have a non-copying GC allocator we can relax that a bit.

Methods ^

void init_pmc(PMC *init)

Initialize the shared reference.

TODO - If the PMC we refer to is an aggregate (or has properties) then:

A direct dereference of the SharedRef is currently not enabled so we shouldn't leak unshared PMCs into different threads.

void init_pmc_props(PMC *init, PMC *props)

Initialize the shared reference with the specified properties.

void share()

We do already sharing - so just ignore.

void mark()

Marks the reference as live.

void set_pmc(PMC *other)

Sets the referenced PMC to *other.

PMC *get_pmc()

Catch dereferencing. This would unshare the refered PMC.

void destroy()

Destroys the refered object and itself. This probably nees destroy oderdering or at least a detection if the refered PMC is already destroyed.

HISTORY ^

Initial revision by leo 2004.01.14.


parrot