• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bypass NSApp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bypass NSApp


  • Subject: Re: bypass NSApp
  • From: Julien Isorce <email@hidden>
  • Date: Thu, 9 Jul 2009 11:46:31 +0200

Hi,

Thx for the reply.

First I think you did not understood my questions.
In other platform, it's possible to run the GUI main loop in any thread.
On macosx, there is a difference between the main run loop and the other
NSRunLoop.
I am trying to isolate this difference in order to avoid to run the main
loop in the main thread.
Because I have no access to the main thread.

I read this :

"What especially distinguishes the main event loop is an input source called
the event source, which is constructed when the global
NSApplication<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//apple_ref/occ/cl/NSApplication>object
(
NSApp<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//apple_ref/c/data/NSApp>)
is initialized. The event source consists of a port for receiving events
from the window server and a FIFO queue—the event queue—for holding those
events until the application can process them"

from apple doc, so I want to use addport on a NSRunLoop to attach the input
source described beside.

I am still suprising of a such limiation of Cocoa on MacOSX while it works
perfectly with GNUstep.

Well, my first mail was very big and maybe not clear so I understand why you
reply those things.

I am free for any suggestion. (I say again: no access to the main thread)

Sincerey

Julien

2009/7/8 lbland <email@hidden>

>
> On Jul 8, 2009, at 4:34 AM, Julien Isorce wrote:
>
>  Any kind of comment or suggestion would be appreciated.
>>
>
> I can see you are just beginning to discover multi-threading.
>
> You need to break in gdb and backtrace all of the thread stacks. That will
> tell you exactly what is going on.
>
>
>  And it has it's own main loop.
>>
>
> That is probably starving the main thread. All you need to do is get that
> code to execute in a sub-thread.
>
> The right way to do it is to get the 3rd party library to play nice with
> the main run loop.
>
> thanks!-
>
> -lance
> VVI
>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: bypass NSApp
      • From: Bill Bumgarner <email@hidden>
References: 
 >bypass NSApp (From: Julien Isorce <email@hidden>)

  • Prev by Date: Re: Confused about NSPrintInfo margins
  • Next by Date: NSStream, parsing NSData to struct
  • Previous by thread: bypass NSApp
  • Next by thread: Re: bypass NSApp
  • Index(es):
    • Date
    • Thread