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: What is the point of create_thread_and_wait()?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Vaclav Haisman on 8/5/2005 4:10 PM:
> What is the point of create_thread_and_wait() in fhandler_netdrive::exists()?
> Or anywhere at all? Why spawning a thread at all when we have to wait for the
> task to finish immediately after it is started? I really would like to know,
> even though it is probably just lack of knowledge on my side.

Windows has the (nasty) habit of blocking EVERYTHING in the current
thread, including ctrl-c, when doing lengthy network tasks.  Spawning the
blocking task to its own thread allows cygwin to still react to signals in
the primary thread.  This threading code was added to fhandler_netdrive
due to complaints at the difficulty in stopping a runaway 'ls -F //' on
large domains when // was first made a directory; search the archives from
earlier this year for more details.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC9CQr84KuGfSFAYARAumxAJ9RVgjCVEscsf9v+HHTc/n8BCkp9gCgtcA5
kBIvfgmuBXAaLsc0ho/HK3k=
=mrcX
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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