Re: How to suspend and resume (almost) all threads of a process ?
Re: How to suspend and resume (almost) all threads of a process ?
- Subject: Re: How to suspend and resume (almost) all threads of a process ?
- From: Eric Albert <email@hidden>
- Date: Fri, 21 Jan 2005 01:01:31 -0800
On Jan 21, 2005, at 12:55 AM, Alexey Proskuryakov wrote:
On 21.01.2005 02:19, "Steve Checkoway" <email@hidden> wrote:
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.
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden