| parrotcode: The concurrency scheduler | |
| Contents | PMCs | 

src/pmc/schedulermessage.pmc - The concurrency scheduler

Implements a message passed between concurrency schedulers.

void init()void init_pmc(PMC *data)Hash PMC with any or all of the keys:idInteger representing the unique identifier for this scheduler message.typeString representing the unique type for this scheduler message.dataPMC representing the data passed in this scheduler message.    VTABLE void init_pmc(PMC *data) {
        PMC                     *elem;
        Parrot_SchedulerMessage *core_struct;
        if (! VTABLE_isa(INTERP, data, CONST_STRING(INTERP, "Hash")))
            real_exception(INTERP, NULL, INVALID_OPERATION,
                "message initializer must be a Hash");
        SELF.init();
        core_struct = PARROT_SCHEDULERMESSAGE(SELF);
        elem = VTABLE_get_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "id"));
        if (! PMC_IS_NULL(elem))
            core_struct->id = VTABLE_get_integer(INTERP, elem);
        elem = VTABLE_get_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "type"));
        if (! PMC_IS_NULL(elem))
            core_struct->type = VTABLE_get_string(INTERP, elem);
        elem = VTABLE_get_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "data"));
        if (! PMC_IS_NULL(elem))
            core_struct->data = elem;
    }
INTVAL get_integer()void set_integer_native(INTVAL value)STRING *get_string()void set_string_native(STRING *value)PMC *share_ro()void destroy()void mark()void visit(visit_info *info)*info is the visit info, (see include/parrot/pmc_freeze.h).void freeze(visit_info *info)void thaw(visit_info *info)
| 
                     | 
                
                     
                 |