Stopping NSThread from withing a C method

Hi
I've got some legacy C code that I'm using from within a 'detached thread' launched from Obj-C code (using the NSThread start method). I need to be able to cancel/stop this thread but don't know how this is possible since I'm in C land which knows nothing about NSThread. Is there a way to use pthreads from the C code to check if [NSThread cancel] was called?

Have you tried something like this?
// in one of your legacy header files
extern void checkThread(void);
// in a .m file
#import <UIKit/UIKit.h>
void checkThread() {
NSThread *t = [NSThread currentThread];
bool bCancelled = [t isCancelled];
printf("bCancelled = %d
", bCancelled);
The above avoids making UIKit.h visible to your legacy .c files in case they don't like it.

Similar Messages

  • Stopping Agents From With the Grid Console

    Hello.
    We are using Grid COntrol 10.2.0.5.0 to monitor various 10g DBs. I have used blackouts in the past when I do various scheduled maintenance on our DBs. We need to physically relocate our Grid OMS and Repository to another RACK (not RAC). Both the OMS and repository reside on the same server being relocated. I have two questions related to this:
    1.) Would blackouts be the best to do in this instance or simply shutting the various DB agents?
    2.) Is there a way from the Grid Console to shut down (not black out) more than one agent at a time?
    Thank you.
    Matt

    Blackout would be best because it design in this way. You can stop all agent by creating job host command but you will not get a succ message agent has stop or not so i would recommend go for blackout

  • All my purchased song from iTunes are not playing complete (iPod and computer with Windows Vista), unexpectedly stops and continues with next song. What am I doing wrong?

    All my purchased song from iTunes are not playing complete (iPod and computer with Windows Vista), unexpectedly stops and continues with next song. What am I doing wrong?

    Are the songs playing whole in iTunes? if not download them again.
    else read this Apple Support Article on your problem
    Have a nice day!

  • How can I STOP mail from syncing with .mac????

    I don't have a .mac account, I will never have a .mac account, I have in mail prefs BOTH boxes under "synchronize with other computers using .mac" unchecked, and yet Mac Mail tries to tie up my entire system "synchronizing with .mac" all the time, especially when traffic is heavy (downloading or uploading). I've got activity viewer on and the stop sign is ghosted, there appears to be no way to stop Mail from doing this useless tie up time wasting process that manages to completely freeze up mail until it's completed and sometimes slow up other programs as well. I only have POP accounts, no IMAP accounts that have to be synced.
    This didn't start happening until I upgraded to 10.4.11. Prior to that Mail blazed through everything, and it NEVER tried to sync with .mac.
    Is there any way to turn this useless "feature" (for me) OFF?
    Thanks!

    I was on Tiger earlier, but just got home to a Leopard machine... and a power outage during the day seems to have blown my Tiger's Monitor, but look for...
    /Users/bd/Library/Application Support/SyncServices/Local/clientdata/com.apple.DotMacSync
    I'd try dragging the whole folder, if it exists...
    /Users/YourUserName/Library/Application Support/SyncServices
    to the Desktop & reboot, we can always move it back if need be.
    /Users/YourUserName/Library/Preferences/ByHost/com.apple.DotMacSync.<ethernet MAC address>.plist
    /Users/YourUserName/Library/Preferences/com.apple.DotMacSync.plist
    are both other good choices to drag to the desktop.
    We might even have to go in and Copy this to the Desktop then Trash the originl...
    /System/Library/CoreServices/dotmacsyncclient

  • I do not want to upgrade to 7.0, I am attending online college and the upgraded version does not work with my school. How can I stop Firefox from upgrading? I have to keep uninstalling the upgrade and installing the old one.

    How can I stop Firefox from automatically upgrading? My on-line college is not compatible with the upgraded version. I have to keep uninstalling the new one and reinstalling the old one.

    It's not a good idea to allow websites to redirect to another site until you know for sure the original site is trustworthy.
    But if you still want to do it (again not a good idea).
    Tools>Options>Advanced>General - In Accessibility, uncheck "warn me when web sites try to redirect..." option.

  • I have itunes set up to sync with my Ipod Touch and my Ipad.  As of today, it keeps looking for an iPhone to sync with and give me an error message.  I don't have an iPhone and don't know how to stop it from popping open with this error message.

    I have Itunes set up to sync with my Ipod touch and Ipad.  As of today, iTunes has started searching to sync with an iPhone, which I don't have and pops open with an error message stating it cannot locate the iPhone to sync.  I have looked in devices and only the iPad and iPod Touch are listed.  Any ideas on how to stop iTunes from searching for any iPhone it is never going to find? It is annoying to have it popping up all the time with the error message.  Thanks in advance for any suggestions.

    You should really read the manual.
    "How do you restore from backup? "
    Restore.  When given the choice, choose to use backup.
    "And how can I check to see if the pics and videos are on my computer somewhere first??"
    They would only be where you put them.  What program did you use to import them?  Pics/vids taken with ipod are not part of the sync process at all.  You should be importing them just as you would with any digital camera.
    If you did not import them, then they are not on your computer.

  • HT1766 Hi, I share an iTunes account with my wife. Sometimes she gets my iMessages and I don't and vice versa. Also if people face time me it goes to her phone. How can I stop this from happening?

    Hi, I share an iTunes account with my wife. Sometimes she gets my iMessages and I don't and vice versa. Also if people face time me it goes to her phone. How can I stop this from happening?

    You can share the same Apple ID in
    Settings > iTunes & App Store > Apple ID: here
    But for all other Apple services like:
    FaceTime, iMessage, iCloud, etc, one of you should use a different Apple ID.

  • I clicked on iMessage on my Macbook Pro today for the first time, and now NOTES keeps opening up every 5 seconds, with a new note.  I cannot stop it from opening. If I close it or force close, it opens again in 5 seconds.  I can't get rid of it.  I have

    I clicked on iMessage on my Macbook Pro today for the first time, and now NOTES keeps opening up every 5 seconds, with a new note.  I cannot stop it from opening. If I close it or force close, it opens again in 5 seconds.  I can't get rid of it.  I have tried to clear out the iMessage settings I had put in, and I've tried to adjust the Accounts to not include notes to synch.  But, Notes will not stop.  It opens a new note, and even if you ignore it, it assumes preference every 5 seconds, and the Mac is impossible to use.

    Do you have any Boot Camp or other secondary partitions set up on your system? If so then try running a disk verification routine (chkdsk, etc.) in Windows to repair the disk. While I've not heard of it happening recently, in the past errors in these partitions have resulted in stubborn ghost files appearing in OS X.

  • How do i stop firefox from trying to go to version 7? if will nto work with some of my SW thus i do not want it. better to uninstall firefox?

    it keeps popping up to tell me to update. yet when i check what it works with and known issues, it will not work with some of the things i use. thus how do i stop firefox from this regual reminder?

    Tools\Options\Advanced..._ and in the "advanced" windows go ot "Update" tab,
    UNCHECK the "Update Application\browser/firefox"
    http://i56.tinypic.com/o5q2b5.jpg

  • I have changed my Apple ID from an old email to a new one.  But It keeps coming up with my old email and asking for my old password. How do i stop this from happening and get it onto my new one?

    I have changed my Apple ID from an old email to a new one.  But It keeps coming up with my old email and asking for my old password. How do i stop this from happening and get it onto my new one?  Its on my Ipad and iphone 5, please help as its doing my head it

    How do you update it? Basically what has happened my password was disabled for "security reasons" on sunday (21/10/12), so i tried to reset it, but for some reason i couldnt get into my old email (probably because i havent used it for 2 years), so i read on here i could swap it to a new email that i currently use (which is what i have done) ive swapped everythin over to it (facetime, iCloud etc) but keeps coming up with old email and asking for password

  • I like to manually upload my photo's to my computer, then import them to iPhoto. My problem with this is that now I have duplicates and it's taking up way to much space on my computer. Is there any way to stop iPhoto from creating duplicates like this?

    I always manually transfer photo's from my SD card to a new folder under Pictures, and then import them into iPhoto. After doing this for quite some time I know realize that I have all these duplicate photo's between iPhoto library and Pictures and a ton of wasted space. I want to continue to upload photo's to a new folder so I can organize them myself and then access them anytime through the finder, if I upload them through iPhoto then they're stored in "iPhoto Library" which can only be accessed through iPhoto. Is there anyway to stop iPhoto from duplicating photo's and just use it to catalog photo's from Pictures? Also on a side note, when using multiple SD cards in one folder, my camera often comes up with duplicate names for totally separate photo's, anyone have an suggestions for this?

    Yes you can set iPhoto to run in Referenced mode but don't. It makes more work for zero advantage, is unnecessary and only storing up problems for the future.
    https://discussions.apple.com/thread/3062728?tstart=0
    has how to do, and why you shouldn't.
    Using iPhoto makes the question about the filenames moot too... Other than that you'll need to renae the files.

  • HT5361 Why is that when I am composing a new message do I end up with multiple versions of my message I am composing up in my Google Trash mailbox?  How can I stop this from happening?

    Why is that when I am composing a new message do I end up with multiple versions of my message I am composing up in my Google Trash mailbox?  How can I stop this from happening?

    It was very hard to see what the box says because the message displays for less than one second. However, I was able to record it with my iphone and pause it until I got a shot of the message. The box says the following:
    "Do you want the application “java” to accept incoming network connections?
    Clicking deny may limit the application’s behavior. This setting can be changed in the Firewall pane of Security preferences."
    I did make some changes. I will see if it works.
    Thank you!!!

  • Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7?

    Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7.0.3?

    Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7.0.3?

  • Verizon is using the Elipsis tablets to steal data from their customers.  The only way to stop data from registering as cellular data is to pull the SIM card.  This occurs with wifi enabled and cellular,dara disabled.  If,you take your tablet to a Verizon

    Verizon is using the Elipsis tablets to steal data from their customers.  The only way to stop data from registering as cellular data is to pull the SIM card.  This occurs with wifi enabled and cellular,dara disabled.  If,you take your tablet to a Verizonstore they will upgrade your data plan to cover the overage and credit the upgrade.  You will then have to remember to downgrade your plan or continue to pay for more data.  Verizon, how would you feel if I walked into one of your stores and started filling my pockets with merchandise?  If cought can I just give the product back and say "oops, sorry"

    Today, my FCC complaint hit the same person working on the BBB complaint.  Jimmie has been very nice and seems willing to work with this problem.  We have been able to come to an agreement.  I paid the purchase price for the phone and he returned my upgrade and unlimited data plan.  This is what would have occurred if Verizon had given me correct information to begin with.  I am happy with this result.  He also brought quite a few instances concerning the handling of my transfer and upgrade that did not follow proper procedure.  I am also confident that I would not have resolved this without complaining to BBB and or FCC.  Verizon had no interest in solving the problem nor did they show any propensity to keeping a 20 year client.  Even though this last CSR was very polite and helpful, his sole job is to respond to formal Federal and State complaints.  He is required by law to address every complaint and report the reporting agency the agreed upon results - good or bad.  Again, I suggest - If you are not getting the proper customer service, complain to someone outside of Verizon.  Jimmie had not received any complaints registered with Verizon directly and I still have not had any contact with any other management representative that I was told would call.

  • HT2729 I bought a TV episode from iTunes (I have version 10 installed), but when I try to play it on my laptop, it keeps stopping and starting, with the voices out of sync with the action.  The action is stop/start as well.  What settings can I change to

    I bought a TV episode from iTunes (I have version 10 installed), but when I try to play it on my laptop, it keeps stopping and starting, with the voices out of sync with the action.  The action is stop/start as well., and occasionally it skips 5 or 10 seconds altogether, making it impossible to watch.  What settings can I change to fix the problem.

    Repair your QuickTime.
    Control Panel > Programs n Features > highlight QuickTime and click CHANGE then REPAIR.

Maybe you are looking for

  • Lenovo Yoga 13 WIFI Problem - making sense of the problem

    Hi Lenovo For the past 3 days i have been doing some research and observations in order to try to make sense of this wifi issue and maybe someone will come up with a solution. Lets start First of all i assume that when this laptop was being developed

  • How to conveyance to clint

    Hi, I have upgrade DB tier and atts tier form 11.5.7 /8.1.7 to 11.5.10.2 /10gR2. Now we are readu to upgrade R12(12.0.4). But my clinent want to first inplement RAC and Configure 11.5.10.2 with 10g RAC database. but i want to first upgrade to R12 and

  • Interview qstns..??

    Hi Gurus, i am posting some of the interview qstns aked in one of the top MNC's last week... pls any one reply me answers to these qstns... full points will be assigned .... a little explanation will be highly appreciated.. here are the questions...

  • HT204387 GPS is not working in Maps for my iPad 1?

    My Apple iPad cannot load Maps. When i open Maps, it is not getting my location. I think its GPS is not working. Still its GPS in ON, it is showing "CANNOT DETERMINE LOCATION".

  • Performance tuning--urgent

    Hi experts, The below selection query is causing performance problem. SELECT: f1~ebeln           f1~ebelp           f1~menge           f3~eindt           f3~menge           f1~knttp           f2~ekorg      INTO TABLE confirm_TAB      FROM  ( ekpo AS