void SubmitCurrentText(const wchar_t* text) { { // copy the text because this is a cross thread accessible data SpinLock::Scope scope(parsingTextLock); parsingText=text; } if(!isParsingRunning) { isParsingRunning=true; parsingRunningEvent.Enter(); ThreadPoolLite::Queue(&ParsingProc, this); } }
~GrammarColorizer() { finalizing=true; parsingRunningEvent.Enter(); parsingRunningEvent.Leave(); }