Re: How to suspend and resume (almost) all threads of a process ?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jan 21, 2005, at 12:55 AM, Alexey Proskuryakov wrote: On 21.01.2005 02:19, "Steve Checkoway" <steve@cs.washington.edu> wrote: -Eric _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Like I said, I'm no expert and perhaps there is a reason to not use the mach thread api (such as there might not be a one to one correspondence between mach threads and pthreads and that might be necessary for your purposes). I am also not an expert here, but the usual argument against suspending threads is that it's next to impossible to do anything in the remaining thread without risking a dead-lock when waiting for some resource owned by a suspended thread. For example, if some suspended thread happened to be inside a malloc, then any garbage collection would probably block forever. OTOH, if Microsoft did it, it probably works in some cases :) We had the advantage of doing this in an environment -- the VM at the core of .NET -- where we managed all of our threads and knew exactly when it was safe to suspend or resume them. There aren't many scenarios in which that's possible. This email sent to site_archiver@lists.apple.com
participants (1)
-
Eric Albert