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 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(); }