iconForFile in a thread
iconForFile in a thread
- Subject: iconForFile in a thread
- From: Steve Gehrman <email@hidden>
- Date: Wed, 25 Jul 2001 02:23:17 -0700
I'm trying to build large hierarchical menus with file icons in a
separate thread (since it is a slow process)
the problem is that NSImage* icon = [[NSWorkspace sharedWorkspace]
iconForFile:path];
crashes the app if called from a thread. Everytime my app crashes I
notice that one or more threads is deep inside this routine.
Is this going to be fixed? How can I get icons for files in a thread
without this call. What good is multi-threaded OS when the APIs crash
when called from threads???
Is the answer to put NSLocks around this call?
steve