Slide 25
Slide 25 text
steal goroutine from other places
/
/ F
i
n
d
s a r
u
n
n
a
b
l
e g
o
r
o
u
t
i
n
e t
o e
x
e
c
u
t
e
.
/
/ T
r
i
e
s t
o s
t
e
a
l f
r
o
m o
t
h
e
r P
'
s
, g
e
t g f
r
o
m g
l
o
b
a
l q
u
e
u
e
, p
o
l
l n
e
t
w
o
r
k
.
f
u
n
c f
i
n
d
r
u
n
n
a
b
l
e
(
) (
g
p *
g
, i
n
h
e
r
i
t
T
i
m
e b
o
o
l
) {
.
.
.
/
/ r
a
n
d
o
m s
t
e
a
l f
r
o
m o
t
h
e
r P
'
s
f
o
r i :
= 0
; i < i
n
t
(
4
*
g
o
m
a
x
p
r
o
c
s
)
; i
+
+ {
i
f s
c
h
e
d
.
g
c
w
a
i
t
i
n
g !
= 0 {
g
o
t
o t
o
p
}
_
p
_ :
= a
l
l
p
[
f
a
s
t
r
a
n
d
1
(
)
%
u
i
n
t
3
2
(
g
o
m
a
x
p
r
o
c
s
)
]
v
a
r g
p *
g
i
f _
p
_ =
= _
g
_
.
m
.
p
.
p
t
r
(
) {
g
p
, _ = r
u
n
q
g
e
t
(
_
p
_
)
} e
l
s
e {
s
t
e
a
l
R
u
n
N
e
x
t
G :
= i > 2
*
i
n
t
(
g
o
m
a
x
p
r
o
c
s
) /
/ f
i
r
s
t l
o
o
k f
o
r r
e
a
d
y q
u
e
u
e
s w
i
t
h m
o
r
e t
h
a
n 1 g
g
p = r
u
n
q
s
t
e
a
l
(
_
g
_
.
m
.
p
.
p
t
r
(
)
, _
p
_
, s
t
e
a
l
R
u
n
N
e
x
t
G
)
}
i
f g
p !
= n
i
l {
r
e
t
u
r
n g
p
, f
a
l
s
e
}
}
.
.
.