Examples of EProc


Examples of erjang.EProc

    ESeq  a = args.testSeq();
   
    if (m==null||f==null||a==null)
      throw ERT.badarg(mod, fun, args);
   
    EProc p2 = new EProc(proc.group_leader(), m, f, a);
   
    proc.link_to(p2);
   
    ERT.run(p2);
   
    return p2.self_handle();
  }
View Full Code Here

Examples of erjang.EProc

      }
     
    }
   

    EProc p2 = new EProc(self.group_leader(), m, f, a);
   
    if (link) {
      self.link_to(p2);
    }
   
    if (priority != null) {
      // may throw badarg!
      p2.process_flag(am_priority, priority);
    }
   
    ERef ref = null;
    if (monitor) {
      ref = ERT.getLocalNode().createRef();
     
      if (!self.monitor(p2.self_handle(), p2.self_handle(), ref)) {
        throw new InternalError("cannot monitor new process?");
        // self.mbox_send(ETuple.make(ERT.am_DOWN, ref, p2.self_handle(), ERT.am_noproc));
      }

    }
   
    ERT.run(p2);
   
    if (monitor) {
      return new ETuple2(p2.self_handle(), ref);
    } else {
      return p2.self_handle();
    }

  }
View Full Code Here

Examples of erjang.EProc

    ESeq  a = args.testSeq();
   
    if (m==null||f==null||a==null)
      throw ERT.badarg(mod, fun, args);
   
    EProc p2 = new EProc(proc.group_leader(), m, f, a);
       
    ERT.run(p2);
   
    return p2.self_handle();
  }
View Full Code Here

Examples of erjang.EProc

                  return ERT.am_ok;
                }
              }, loader);

              EProc proc = new EProc(self.group_leader(),
                  am_erlang, am_apply, EList.make(job, ERT.NIL));
              ERT.run(proc);
             
              return reply.getb();
            }
View Full Code Here

Examples of erjang.EProc

      throw new InternalError("invalid access mode");
    }
  }

  EInternalPID owner_pid() {
    EProc o = owner.get();
    if (o == null)
      throw ERT.badarg();
    return o.self_handle();
  }
View Full Code Here

Examples of erjang.EProc

  }

    public void transfer_ownership_to(EInternalPID new_owner, EObject transfer_data) throws Pausable {
        EInternalPID former_owner = owner_pid();
        System.err.println("DB| transfer ownership of "+tid+" from "+former_owner+" to "+new_owner+" with tag "+transfer_data);
        EProc new_owner_task;
        if ((new_owner_task = new_owner.task()) != null) {
            //System.err.println("received exit from owner "+former_owner
            //          +" => transfer to "+new_owner_task);

            ETuple msg = ETuple.make(EAtom.intern("ETS-TRANSFER"),
                    this.is_named ? this.aname : this.tid,
                    former_owner,
                    transfer_data);

            this.owner = new WeakReference<EProc>(new_owner_task);
            new_owner_task.add_exit_hook(this);
            former_owner.remove_exit_hook(this);

            new_owner.send(former_owner, msg);
        } else {
            delete();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.