Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any actor or coroutine implementations for Cocoa?



On 29 Apr '08, at 7:16 PM, Michael Ash wrote:

There were a lot of problems with Cocoa and returning to the runloop
without returning back the way I came

Yes, I can see that there would have to be a rule that only the main coroutine (i.e. the original 'real' stack) gets to use the runloop.


I think this can be dealt with by having (in your example) a separate coroutine that brings up the sheet; then that coroutine blocks until the sheet is dismissed, returning control to the main routine that returns back to the runloop.

In the actor model, most of the application code would be in the form of actors waiting for specific events (menus, buttons, etc.), that would get a message when the event occurred, do their thing, then return or yield. The main routine would mostly be receiving the events from the runloop and dispatching them as messages to actors.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Any actor or coroutine implementations for Cocoa? (From: Jens Alfke <email@hidden>)
 >Re: Any actor or coroutine implementations for Cocoa? (From: Jens Alfke <email@hidden>)
 >Re: Any actor or coroutine implementations for Cocoa? (From: "Michael Ash" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.