static MFUN(gw_shred_exit) {
const VM_Shred s = ME(o);
- vm_shred_exit(s);
+ if((m_int)s->tick->prev != -1)
+ shreduler_remove(s->tick->shreduler, s, true);
}
static MFUN(vm_shred_id) {
describe_path_and_dir(_code, s->code->name)
static DTOR(shred_dtor) {
- if (ME(o)) {
- VM_Shred s = ME(o);
- free_vm_shred(s);
- }
+ VM_Shred s = ME(o);
+ free_vm_shred(s);
}
static MFUN(shred_lock) { if(ME(o)->tick) MUTEX_LOCK(ME(o)->tick->shreduler->mutex); }
sh->tick->parent = shred->tick;
if (!shred->tick->child.ptr) vector_init(&shred->tick->child);
vector_add(&shred->tick->child, (vtype)sh);
- vector_add(&shred->gc, (vtype)sh->info->me);
+// vector_add(&shred->gc, (vtype)sh->info->me);
return sh;
}