Hi Parimal,
See NSWorkspace.

NSWorkspaceWillSleepNotification
Posted before the machine goes to sleep. An observer of this message can
delay sleep for up to 30 seconds while handling this notification.

-Ken


On Thu, Oct 15, 2009 at 10:36 PM, Parimal Das <parimal....@webyog.com>wrote:

> Hi All
>
> When my app is doing some critical I/O transactions with OpenSsl,
> And the user is sleeping the machine (just by folding the laptop).
> Some of the app threads are hanging
>
> Is there any way in cocoa to do following steps? Also is this logic
> correct?
>
> 1. Detect when a sleep (soft or hard) is issued
> 2. Delay sleep till my threads come out
> 3. Then continue to going into sleep.
>
> Please suggest.
>
> Thank you
> -Parimal Das
> _______________________________________________
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> 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/kenferry%40gmail.com
>
> This email sent to kenfe...@gmail.com
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to