FROM : Mike Abdullah
DATE : Sat Jan 05 13:57:56 2008
On 5 Jan 2008, at 12:02, Andre Schnoor wrote:
> Dave Camp wrote:
>> On Dec 30, 2007, at 3:14 AM, Andre Schnoor wrote:
>>> Chris Hanson wrote:
>>>> Why do you think restricting threads to run on only 2 cores will
>>>> be useful?
>>>
>>> I observed problems with GUI threads when running the app on an 8-
>>> core Mac Pro, while it runs fine on dual core CPUs and PPC. The
>>> fix is intented as a temporary workaround only until I found the
>>> real cause.
>>
>> That's your problem. All of your GUI (with a few exceptions) needs
>> to be on the main thread.
>>
>
> I understand. But why is the method that forks a drawing thread
> called #detachDrawingThread:toTarget:withObject: in the first place?
> IMHO, this is misleading.
>
> If the detached thread (which currently initiates all of my graphics
> output, except window and menu creation) is not allowed to do any UI
> drawing, then it should not be called a "drawing" thread. Apple
> should mention this in the documentation clearly.
This is true, but the docs clearly state that that method is just a
convenience for +detachNewThreadSelector:toTarget:withObject:
You can do some drawing on a background thread if you wish.
NSProgressIndicator does it for a start. BUT you have to be VERY
careful to properly lock the view you are drawing into so that nothing
goes wrong.
Mike.
DATE : Sat Jan 05 13:57:56 2008
On 5 Jan 2008, at 12:02, Andre Schnoor wrote:
> Dave Camp wrote:
>> On Dec 30, 2007, at 3:14 AM, Andre Schnoor wrote:
>>> Chris Hanson wrote:
>>>> Why do you think restricting threads to run on only 2 cores will
>>>> be useful?
>>>
>>> I observed problems with GUI threads when running the app on an 8-
>>> core Mac Pro, while it runs fine on dual core CPUs and PPC. The
>>> fix is intented as a temporary workaround only until I found the
>>> real cause.
>>
>> That's your problem. All of your GUI (with a few exceptions) needs
>> to be on the main thread.
>>
>
> I understand. But why is the method that forks a drawing thread
> called #detachDrawingThread:toTarget:withObject: in the first place?
> IMHO, this is misleading.
>
> If the detached thread (which currently initiates all of my graphics
> output, except window and menu creation) is not allowed to do any UI
> drawing, then it should not be called a "drawing" thread. Apple
> should mention this in the documentation clearly.
This is true, but the docs clearly state that that method is just a
convenience for +detachNewThreadSelector:toTarget:withObject:
You can do some drawing on a background thread if you wish.
NSProgressIndicator does it for a start. BUT you have to be VERY
careful to properly lock the view you are drawing into so that nothing
goes wrong.
Mike.
| Related mails | Author | Date |
|---|---|---|
| Andre Schnoor | Dec 29, 18:09 | |
| John Stiles | Dec 29, 19:10 | |
| Chris Hanson | Dec 30, 03:51 | |
| Chris Driggett | Dec 30, 04:45 | |
| Wade Tregaskis | Dec 30, 08:39 | |
| Andre Schnoor | Dec 30, 12:14 | |
| Andre Schnoor | Dec 30, 13:33 | |
| Dave Camp | Dec 30, 19:08 | |
| Chris Williams | Dec 30, 19:22 | |
| Andre Schnoor | Jan 5, 13:02 | |
| Mike Abdullah | Jan 5, 13:57 |






Cocoa mail archive

