NSString: Cache ICU collator in thread-local storage (#450)

* Add ICU collator caching

* Update ChangeLog
This commit is contained in:
Hugo Melder 2024-09-23 14:32:36 +02:00 committed by GitHub
parent cdbb1cc1b4
commit 5cd19978d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 198 additions and 105 deletions

View file

@ -1194,6 +1194,7 @@ unregisterActiveThread(NSThread *thread)
DESTROY(_target);
DESTROY(_arg);
DESTROY(_name);
DESTROY(_stringCollatorCache);
if (_autorelease_vars.pool_cache != 0)
{
[NSAutoreleasePool _endThread: self];
@ -1570,9 +1571,18 @@ nsthreadLauncher(void *thread)
return _thread_dictionary;
}
- (id) _stringCollatorCache
{
return (id)self->_stringCollatorCache;
}
- (void) _setStringCollatorCache: (id) cache
{
ASSIGN(self->_stringCollatorCache, cache);
}
@end
@implementation NSThread (GSLockInfo)