public void Dispose() { if (_allocated) { _parser.Dispose(); _state.Dispose(); _allocated = true; } }
/// <summary> /// force the job to be processed in the main thread for debuging user defined parser. /// </summary> /// <param name="index"></param> public unsafe void LoadFileInMainThread(int file_index) { var p_state = _state[file_index]; if (p_state.Target->RefCount == 0) { var p_tmp = new ParseJob <T>(_alloc, _enableBurst); p_tmp.BlockSize = _blockSize; p_tmp.ReadFileInMainThread(_pathList[file_index], _encoding, _data[file_index], p_state); p_tmp.Dispose(); p_state.Target->JobState = ReadJobState.Completed; } p_state.Target->RefCount++; }