Skip to content

Commit 3a37c11

Browse files
committed
Add example to reproduce pybind/pybind11#1525
1 parent 99e9157 commit 3a37c11

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ompybind11/test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
import ompybind11 # isort:skip
66

77
done = ompybind11.do(function=(lambda x: x + 40.0), x=2.0)
8-
print('ompybind11.do(function=(lambda x: x + 40.0), x=2.0) returned {}'.format(done))
8+
print('ompybind11.do(function=(lambda x: x + 40.0), x=2.0) returned {}'.format(
9+
done))
10+
11+
# This reproduces 1525
12+
#from concurrent.futures import ThreadPoolExecutor # isort:skip
13+
#with ThreadPoolExecutor(max_workers=2) as e:
14+
# e.submit(ompybind11.do, lambda x: x + 40.0, 2.0)
15+
# e.submit(ompybind11.do, lambda x: x + 40.0, 2.0)
16+
917

1018
def f(x):
1119
return x * x

0 commit comments

Comments
 (0)