From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DDDB3858413; Fri, 21 Jan 2022 17:14:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DDDB3858413 From: "ulatekh at yahoo dot com" To: glibc-bugs@sourceware.org Subject: [Bug librt/28799] [Feature request] Enhanced timer_create()/timer_delete(), for MS Windows parity Date: Fri, 21 Jan 2022 17:14:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: librt X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ulatekh at yahoo dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2022 17:14:29 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28799 --- Comment #2 from Steven Boswell II --- Although my limited testing shows that, indeed, this allows the timer to get shut down cleanly, it reveals another problem. Apparently, in the Linux implementation, a new thread is created (and quick= ly destroyed) for every invocation of a callback-based timer, accompanied by a flood of "New Thread" and "Thread exited" messages in my gdb window. (The t= imer in question is invoked 40 times per second.) My reading of glibc's sysdeps/unix/sysv/linux/timer_routines.c concurs; timer_helper_thread() repeatedly invokes pthread_create() on timer_sigev_thread(), which runs the timer callback once and then exits. So thanks for your help, but I'm just going to go back to my hand-rolled thread-based timer implementation, which creates a thread per timer, not a thread per timer-invocation. --=20 You are receiving this mail because: You are on the CC list for the bug.=