-
- // We didn't find an engine the first time through, or there was no
- // stack. Create an engine.
- const LanguageBreakEngine *newlbe = loadEngineFor(c, breakType);
-
- // Now get the lock, and see if someone else has created it in the
- // meantime
- umtx_lock(NULL);
- i = fEngines->size();
- while (--i >= 0) {
- lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i));
- if (lbe != NULL && lbe->handles(c, breakType)) {
- break;
- }
- lbe = NULL;
- }
- if (lbe == NULL && newlbe != NULL) {
- fEngines->push((void *)newlbe, status);
- lbe = newlbe;
- newlbe = NULL;
- }
- umtx_unlock(NULL);
-
- delete newlbe;
-