[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-20 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks INADA-san for fixing this old issue!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-19 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 001fee14e0f2ba5f41fb733adc69d5965925a094 by Inada Naoki in branch 
'master':
bpo-12822: use monotonic clock for condvar if possible (GH-11723)
https://github.com/python/cpython/commit/001fee14e0f2ba5f41fb733adc69d5965925a094


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-19 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-01 Thread INADA Naoki


Change by INADA Naoki :


--
pull_requests: +11601, 11602
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-01 Thread INADA Naoki


Change by INADA Naoki :


--
pull_requests: +11601
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-01-31 Thread Matt Joiner


Change by Matt Joiner :


--
nosy:  -anacrolix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-01-31 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-23428: "Use the monotonic clock for thread conditions on POSIX 
platforms".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-01-31 Thread INADA Naoki


INADA Naoki  added the comment:

ref: https://bugs.chromium.org/p/webrtc/issues/detail?id=9269
macOS and iOS don't support pthread_condattr_setclock yet.

--
components: +Interpreter Core -None
versions: +Python 3.8 -Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2012-03-14 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

See also #14222. Python 3.3 has a new time.steady() function.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-11-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 The patch is ok on the principle, but we do need a check
 that CLOCK_MONOTONIC is supported at build time.

timemodule.c is now using #ifdef CLOCK_MONOTONIC.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-11-28 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Marc-Andre is right, a runtime check is probably also needed.
(for example with mismatching kernel/libc)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-11-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

pthread_condattr_setclock() result should be checked.

The pthread_condattr_setclock() function may fail if:

EINVAL The value specified by clock_id does not refer to a known clock, or is a 
CPU-time clock.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-11-25 Thread Matt Joiner

Changes by Matt Joiner anacro...@gmail.com:


--
nosy: +anacrolix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread INADA Naoki

New submission from INADA Naoki songofaca...@gmail.com:

Using CLOCK_MONOTONIC is better than CLOCK_REALTIME (default) for GIL
because settimeofday() may break the pthread_cond_timedwait().

Attached patch uses CLOCK_MONOTONIC and clock_gettime. But I don't know
how to write appropriate configure script.
-lrt is also needed to use clock_gettime() but I don't know how to add
it to LIBS.

--
components: None
files: use_monotonic_clock.patch
keywords: patch
messages: 142789
nosy: naoki
priority: normal
severity: normal
status: open
title: NewGIL should use CLOCK_MONOTONIC if possible.
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23013/use_monotonic_clock.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also #10278.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 Using CLOCK_MONOTONIC is better than CLOCK_REALTIME (default) for GIL
 because settimeofday() may break the pthread_cond_timedwait().

Indeed.
A couple remarks:
- regular locks and conditions variables exposed by the threading module suffer 
from the same problem
- POSIX semaphores are also affected, but you can't select an alternative clock 
source
- actually, CLOCK_MONOTONIC is affected by NTP adjustements: while it's 
guaranteed not to go backward, its rate can be affected

Did you really encounter this problem, or is this just a theoretical concern?

--
nosy: +neologix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The patch is ok on the principle, but we do need a check that CLOCK_MONOTONIC 
is supported at build time.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Antoine Pitrou wrote:
 
 The patch is ok on the principle, but we do need a check that CLOCK_MONOTONIC 
 is supported at build time.

I think we need both: a check at build time to avoid
compiler errors and a check at runtime whether the deployment
platform supports the clock, plus a fallback solution in case
it is not available.

--
nosy: +lemburg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12822
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com