This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch]: Timer functions
On Mon, Mar 07, 2005 at 11:20:40AM -0500, Pierre A. Humblet wrote:
>----- Original Message -----
>From: "Pierre A. Humblet"
>Sent: Sunday, March 06, 2005 11:40 PM
>Subject: Re: [Patch]: Timer functions
>
>
>> At 11:00 PM 3/6/2005 -0500, Christopher Faylor wrote:
>> >I am puzzled by a couple of things.
>> >
>> >Why did you decide to forego using th->detach in favor of (apparently)
>> >a:
>> >
>> > while (running)
>> > low_priority_sleep (0);
>>
>> These are not directly related. I got into this issue because of the bug
>> where cygthreads were not reused. I replaced th->detach by self_release
>> because that seemed to be the most natural and efficient way
>> to fix the problem.
>
>Also that frees the cygthread when the timer expires, not when it's
>rearmed (if ever).
The design was that the thread is associated with the timer for as long
as the timer exists. The fact that it wasn't being detached when the
timer was deleted is a bug.
I don't see any reason to reinvent a less efficient way of detaching
from the thread when detach should do the job.
cgf