Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
wrap
pybind11
tests
test_thread.py
Go to the documentation of this file.
1
from
__future__
import
annotations
2
3
import
sys
4
import
threading
5
6
import
pytest
7
8
from
pybind11_tests
import
thread
as
m
9
10
11
class
Thread
(threading.Thread):
12
def
__init__
(self, fn):
13
super().
__init__
()
14
self.
fn
= fn
15
self.
e
=
None
16
17
def
run
(self):
18
try
:
19
for
i
in
range
(10):
20
self.
fn
(i, i)
21
except
Exception
as
e:
22
self.
e
= e
23
24
def
join
(self):
25
super().
join
()
26
if
self.
e
:
27
raise
self.
e
28
29
30
@pytest.mark.skipif(sys.platform.startswith(
"emscripten"
), reason=
"Requires threads"
)
31
def
test_implicit_conversion
():
32
a =
Thread
(m.test)
33
b =
Thread
(m.test)
34
c =
Thread
(m.test)
35
for
x
in
[a, b, c]:
36
x.start()
37
for
x
in
[c, b, a]:
38
x.join()
39
40
41
@pytest.mark.skipif(sys.platform.startswith(
"emscripten"
), reason=
"Requires threads"
)
42
def
test_implicit_conversion_no_gil
():
43
a =
Thread
(m.test_no_gil)
44
b =
Thread
(m.test_no_gil)
45
c =
Thread
(m.test_no_gil)
46
for
x
in
[a, b, c]:
47
x.start()
48
for
x
in
[c, b, a]:
49
x.join()
test_thread.Thread.fn
fn
Definition:
test_thread.py:14
gtsam::range
Double_ range(const Point2_ &p, const Point2_ &q)
Definition:
slam/expressions.h:30
test_thread.test_implicit_conversion
def test_implicit_conversion()
Definition:
test_thread.py:31
test_thread.Thread.e
e
Definition:
test_thread.py:15
test_thread.Thread.run
def run(self)
Definition:
test_thread.py:17
test_thread.Thread.__init__
def __init__(self, fn)
Definition:
test_thread.py:12
test_thread.test_implicit_conversion_no_gil
def test_implicit_conversion_no_gil()
Definition:
test_thread.py:42
test_thread.Thread.join
def join(self)
Definition:
test_thread.py:24
test_thread.Thread
Definition:
test_thread.py:11
gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:06:21