• 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: Correct way to force kill a thread.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct way to force kill a thread.


  • Subject: Re: Correct way to force kill a thread.
  • From: "Ben D. Jones" <email@hidden>
  • Date: Wed, 22 Jun 2005 15:32:31 -0400

Well... I'll have to take a look at it. I reviewed those constants and am unsure how to manuipulate them from CURLHandle. I'm asking this question in the CURLHandle mailing list as well. Thanks for the input, still working on it.

~Ben

On Jun 21, 2005, at 1:45 PM, Mark Lively wrote:

I have limited experience with libcurl but as I recall you provide the curl send with a read function or a write function. The function can then check a flag that you set the next time it is told to read/write and then return an error.

take a look at the flags CURLOPT_READFUNCTION and CURLOPTWRITEFUNCTION

On Jun 21, 2005, at 1:27 PM, John Stiles wrote:


There is no way to force-kill a thread cleanly. You will leak memory, objects, network connections, etc. OTOH, you can force- kill a separate process cleanly and they are not expensive to create.

You should consider finding a different API that works asynchronously instead of synchonously--I don't know libcurl, but if it only has a synchronous API, it might not be good enough for your needs. I have used the NSURL APIs and they are very flexible and easy to cancel mid-flight. I had really good luck with them so you might want to give it a shot.


On Jun 21, 2005, at 10:04 AM, Ben D. Jones wrote:


I am using CURLHandle (libcurl) in my program. The actual upload happens in a seperate thread, and I need the ability to kill that thread if the user hits cancel. This is made difficult because when you tell CURLHandle to prepareAndPerformCurl locks the thread its in. Any ideas?


Ben D. Jones Apricle Technologies http://www.apricle.net


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Correct way to force kill a thread.
      • From: Jerry Krinock <email@hidden>
References: 
 >Correct way to force kill a thread. (From: "Ben D. Jones" <email@hidden>)
 >Re: Correct way to force kill a thread. (From: John Stiles <email@hidden>)
 >Re: Correct way to force kill a thread. (From: Mark Lively <email@hidden>)

  • Prev by Date: Re: How do I find my Application's directory?
  • Next by Date: Re: How do I find my Application's directory?
  • Previous by thread: Re: Correct way to force kill a thread.
  • Next by thread: Re: Correct way to force kill a thread.
  • Index(es):
    • Date
    • Thread