protected IoUringThread(string name, IoUringOptions options, int cpuId) { _options = options; _ring = new Ring(options.RingSize); _unblockHandle = new RingUnblockHandle(_ring); _cpuId = cpuId; int id; lock (_threadIds) { if (!_threadIds.TryGetValue(name, out id)) { _threadIds[name] = id = -1; } _threadIds[name] = id += 1; } _thread = new Thread(obj => ((IoUringThread)obj).Loop()) { IsBackground = true, Name = $"{name} - {id}" }; }
public TransportThreadScheduler(RingUnblockHandle unblockHandle, ConcurrentQueue <AsyncOperation> asyncOperationQueue, ConcurrentDictionary <int, object> asyncOperationStates) { _unblockHandle = unblockHandle; _asyncOperationQueue = asyncOperationQueue; _asyncOperationStates = asyncOperationStates; }