You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/11/05 01:06:11 UTC

[GitHub] [skywalking-python] kezhenxu94 commented on a diff in pull request #246: feat: add GreenletProfiler

kezhenxu94 commented on code in PR #246:
URL: https://github.com/apache/skywalking-python/pull/246#discussion_r1014540376


##########
skywalking/profile/profile_context.py:
##########
@@ -34,6 +34,24 @@
 from skywalking.utils.time import current_milli_time
 
 
+THREAD_MODEL = 'thread'
+try:
+    from gevent import monkey
+    import greenlet
+    from gevent.exceptions import BlockingSwitchOutError
+
+    if monkey.is_module_patched('threading'):
+        if greenlet.__version__ < '2.0.0':

Review Comment:
   This looks error prone. Can you use the `packaging` module to parse and compare the version?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org