/// <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++; }
public unsafe void LoadFileInMainThread(string path) { if (path.Length == 0) { throw new ArgumentException("path string is empty."); } if (_state.Target->RefCount == 0) { _parser.BlockSize = _blockSize; _parser.ReadFileInMainThread(path, Encoding, Data, _state); _state.Target->JobState = ReadJobState.Completed; _state.Target->RefCount = 1; } }