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: <430C9C04.4020905@vihmapuu.ee> Date: Wed, 24 Aug 2005 19:10:44 +0300 From: Raul Metsma User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Problems with Windows threads and cygwin sleep() Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes There seems to be some kind issues with cygwin sleep() and Windows threads. I created one test program which creates 600 threads with native windows Sleep(1). Now when I compile simple c program under cygwin while(1) { sleep(1); } and execute it, the first program will eat 100% CPU. It does not have any problem with Mingw compiled version. Then I tried compile it under cygwin, using native windows Sleep() ( Uppercase ) and included w32api/windows.h header, then it does not have this issue. I discovered this, using rsync. When I changed rsync sleeps, with native versions, then there seems to be still same issue. Maybe cygwin uses inside dll sleep? I really hope to get this issue fixed Raul Metsma -- 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/