Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42F4242C.1020707@byu.net> Date: Fri, 05 Aug 2005 20:45:00 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: What is the point of create_thread_and_wait()? References: <20050805234708 DOT P84746 AT logout DOT sh DOT cvut DOT cz> In-Reply-To: <20050805234708.P84746@logout.sh.cvut.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----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 AT byu DOT 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/