Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Handling Services in a separate thread?

Handling Services in a separate thread?
Thread Tools
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Aug 12, 2003, 09:56 AM
 
Hi,

I am writing a simple app whose main function is to provide a System Service.

However I'd like the user to be able to customise the behaviour of the service through some UI.

This is a bit tricky because the whole cycle of accepting the service request, doing the processing on the incoming data, then writing the changed data out to the pasteboard must all take place within one method.

This means that while the service cycle is going my only thread is busy. (so I can't do UI stuff.)

I'm a bit of a novice with threads, and after reading up on them I have noticed that you usually detach a new thread to run a method.

However the method that does my Service stuff is not called by me - it's called by NSApp (I think) so I don't get a chance to spin it off.

Does anyone know how I can get round this?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:18 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2