public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Zhang, Qiang" <qiang.zhang@windriver.com>
To: richard.purdie@linuxfoundation.org
Cc: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH] python3: use monotonic clock for condvar if possible
Date: Tue,  3 Aug 2021 13:11:38 +0800	[thread overview]
Message-ID: <20210803051138.30790-1-qiang.zhang@windriver.com> (raw)

From: Zqiang <qiang.zhang@windriver.com>

The timeout for threading.Lock, threading.Condition, etc, is not using
a monotonic clock, it is affected if the system time (realtime clock)
is set.

This patch will make condvar use monotonic clock.
Refence: https://bugs.python.org/issue41710

Signed-off-by: Zqiang <qiang.zhang@windriver.com>
---
 meta/recipes-devtools/python/python3_3.9.5.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/python/python3_3.9.5.bb b/meta/recipes-devtools/python/python3_3.9.5.bb
index 82177f4a18..f3f0237c78 100644
--- a/meta/recipes-devtools/python/python3_3.9.5.bb
+++ b/meta/recipes-devtools/python/python3_3.9.5.bb
@@ -73,6 +73,9 @@ DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/li
 DEPENDS_append_class-target = " python3-native"
 DEPENDS_append_class-nativesdk = " python3-native"
 
+# force to use the mutex+cond implementation
+CFLAGS += "-DHAVE_BROKEN_POSIX_SEMAPHORES"
+
 EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}"
 EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
 
-- 
2.17.1


             reply	other threads:[~2021-08-03  4:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  5:11 Zhang, Qiang [this message]
2021-08-09 15:45 ` [OE-core] [PATCH] python3: use monotonic clock for condvar if possible Steve Sakoman
2021-08-09 17:53 ` Ross Burton
2021-08-11 11:36   ` Alexander Kanavin
2021-08-11 16:14     ` Mike Crowe
2021-08-11 16:32       ` Alexander Kanavin
2021-08-11 16:57         ` Mike Crowe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803051138.30790-1-qiang.zhang@windriver.com \
    --to=qiang.zhang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox