This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to detect a cygwin thread?

Piotr Wyderski writes:
> > Why assume Cygwin could be the only source of extra threads?
> There is no such assumption. But Cygwin is the only
> source of threads that can stop the program entirely,
> so they must be treated in an exceptional way.

Well, I guess you must be aware of *all* sources of external threads so that you
*know* none of them besides a Cygwin thread could stop the program entirely. 
Such as, a thread Windows may inject to post some event to the process.  OK, if
you say so.
> > Wouldn't it make more sense to have your program remember its own threads and
> > only suspend those?
> No, the snapshot should be as exact as possible,
> including "alien" threads. It has already proven to
> be of key importance.

This I can understand.

So it looks like your original question could be restated as "Is there an API in
Cygwin that allows an application to enumerate all Cygwin threads in the app,
including internal Cygwin threads?".  I don't know of any but maybe somebody
else on the list does.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]