public static Actor make(ActorPool pool, Func receive) { Actor self = new Actor(); make_(self, pool, receive); return(self); }
public static Actor makeCoalescing(ActorPool pool, Func k, Func c, Func r) { Actor self = new Actor(); makeCoalescing_(self, pool, k, c, r); return(self); }
public static ActorPool make(Func itBlock) { ActorPool self = new ActorPool(); make_(self, itBlock); return(self); }
public static void make_(ActorPool self, Func itBlock) { if (itBlock != null) { itBlock.enterCtor(self); itBlock.call(self); itBlock.exitCtor(); } if (self.m_maxThreads < 1) throw ArgErr.make("ActorPool.maxThreads must be >= 1, not " + self.m_maxThreads).val; self.m_threadPool = new ThreadPool((int)self.m_maxThreads); self.m_scheduler = new Scheduler(); }
public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c, Func r) { if (k != null && !k.isImmutable()) { throw NotImmutableErr.make("Coalescing toKey func not immutable: " + k).val; } if (c != null && !c.isImmutable()) { throw NotImmutableErr.make("Coalescing coalesce func not immutable: " + c).val; } make_(self, pool, r); self.m_queue = new CoalescingQueue(k, c); }
public static void make_(ActorPool self, Func itBlock) { if (itBlock != null) { itBlock.enterCtor(self); itBlock.call(self); itBlock.exitCtor(); } if (self.m_maxThreads < 1) { throw ArgErr.make("ActorPool.maxThreads must be >= 1, not " + self.m_maxThreads).val; } self.m_threadPool = new ThreadPool((int)self.m_maxThreads); self.m_scheduler = new Scheduler(); }
public static void make_(Actor self, ActorPool pool, Func receive) { // check pool if (pool == null) { throw NullErr.make("pool is null").val; } // check receive method if (receive == null && self.@typeof().qname() == "concurrent::Actor") { throw ArgErr.make("must supply receive func or subclass Actor").val; } if (receive != null && !receive.isImmutable()) { throw NotImmutableErr.make("Receive func not immutable: " + receive).val; } // init self.m_pool = pool; self.m_receive = receive; self.m_queue = new Queue(); }
public static ActorPool make(Func itBlock) { ActorPool self = new ActorPool(); make_(self, itBlock); return self; }
public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c) { makeCoalescing_(self, pool, k, c, null); }
public static Actor makeCoalescing(ActorPool pool, Func k, Func c) { return(makeCoalescing(pool, k, c, null)); }
////////////////////////////////////////////////////////////////////////// // Construction ////////////////////////////////////////////////////////////////////////// public static Actor make(ActorPool pool) { return make(pool, null); }
public static void make_(ActorPool self) { make_(self, null); }
public static void make_(Actor self, ActorPool pool) { make_(self, pool, null); }
public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c) { makeCoalescing_(self, pool, k, c, null); }
public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c, Func r) { if (k != null && !k.isImmutable()) throw NotImmutableErr.make("Coalescing toKey func not immutable: " + k).val; if (c != null && !c.isImmutable()) throw NotImmutableErr.make("Coalescing coalesce func not immutable: " + c).val; make_(self, pool, r); self.m_queue = new CoalescingQueue(k, c); }
public static Actor makeCoalescing(ActorPool pool, Func k, Func c, Func r) { Actor self = new Actor(); makeCoalescing_(self, pool, k, c, r); return self; }
public static Actor makeCoalescing(ActorPool pool, Func k, Func c) { return makeCoalescing(pool, k, c, null); }
public static Actor make(ActorPool pool, Func receive) { Actor self = new Actor(); make_(self, pool, receive); return self; }
public static void make_(ActorPool self) { make_(self, null); }
public static void make_(Actor self, ActorPool pool) { make_(self, pool, null); }
////////////////////////////////////////////////////////////////////////// // Construction ////////////////////////////////////////////////////////////////////////// public static Actor make(ActorPool pool) { return(make(pool, null)); }
public static void make_(Actor self, ActorPool pool, Func receive) { // check pool if (pool == null) throw NullErr.make("pool is null").val; // check receive method if (receive == null && self.@typeof().qname() == "concurrent::Actor") throw ArgErr.make("must supply receive func or subclass Actor").val; if (receive != null && !receive.isImmutable()) throw NotImmutableErr.make("Receive func not immutable: " + receive).val; // init self.m_pool = pool; self.m_receive = receive; self.m_queue = new Queue(); }