public IpcManager(IpcChannel channel) { in_queue_ = new IpcMessageQueue(); out_queue_ = new IpcMessageQueue(); executor_ = new IoServiceExecutor(2); channel_ = channel; reader_ = new IpcReader(channel_, in_queue_); writer_ = new IpcWriter(channel_, out_queue_); executor_.Submit(() => { try { reader_.start(); } catch (Exception e) { StdErrorOut.Instance.StdError("IpcManager.reader_.start(); failed.", e); } }); executor_.Submit(() => { try { writer_.start(); } catch (Exception e) { StdErrorOut.Instance.StdError("IpcManager.writer_.start(); failed.", e); } }); }
ReducerURKR make_reducer(int size_limit = 256 * 1024, int count_limit = 1000, FlushCallback cb = null) { if (cb == null) { cb = (kr) => { } } ; var executor = new IoServiceExecutor(8); return(new ReducerURKR(executor, cb, (ulong)size_limit, (ulong)count_limit)); }