Skip to content

Commit 74c1db1

Browse files
committed
Updated patching in example
1 parent cf9c867 commit 74c1db1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

examples/simple_thing.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/usr/bin/env python
2-
from gevent import monkey
2+
from labthings import monkey
33

4-
# Patch most system modules. Leave threads untouched so we can still use them normally if needed.
5-
print("Monkey patching with Gevenet")
6-
monkey.patch_all(thread=False)
7-
print("Monkey patching successful")
4+
monkey.patch_all()
85

96
import random
107
import math
@@ -25,11 +22,6 @@
2522
"""
2623

2724

28-
from gevent.monkey import get_original
29-
30-
get_ident = get_original("_thread", "get_ident")
31-
32-
3325
class MyComponent:
3426
def __init__(self):
3527
self.x_range = range(-100, 100)

0 commit comments

Comments
 (0)