Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
0a5df698
Commit
0a5df698
authored
Sep 28, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename gevent.run() -> gevent.wait()
parent
5b96b1b9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
+9
-6
examples/portforwarder.py
examples/portforwarder.py
+1
-1
examples/psycopg2_pool.py
examples/psycopg2_pool.py
+1
-1
examples/threadpool.py
examples/threadpool.py
+1
-1
gevent/__init__.py
gevent/__init__.py
+5
-2
greentest/testrunner.py
greentest/testrunner.py
+1
-1
No files found.
examples/portforwarder.py
View file @
0a5df698
...
...
@@ -78,7 +78,7 @@ def main():
gevent
.
signal
(
signal
.
SIGTERM
,
server
.
close
)
gevent
.
signal
(
signal
.
SIGINT
,
server
.
close
)
server
.
start
()
gevent
.
run
()
gevent
.
wait
()
def
log
(
message
,
*
args
):
...
...
examples/psycopg2_pool.py
View file @
0a5df698
...
...
@@ -166,6 +166,6 @@ if __name__ == '__main__':
start
=
time
.
time
()
for
_
in
xrange
(
4
):
gevent
.
spawn
(
pool
.
execute
,
'select pg_sleep(1);'
)
gevent
.
run
()
gevent
.
wait
()
delay
=
time
.
time
()
-
start
print
'Running "select pg_sleep(1);" 4 times with 3 connections. Should take about 2 seconds: %.2fs'
%
delay
examples/threadpool.py
View file @
0a5df698
...
...
@@ -7,6 +7,6 @@ pool = ThreadPool(3)
start
=
time
.
time
()
for
_
in
xrange
(
4
):
pool
.
spawn
(
time
.
sleep
,
1
)
gevent
.
run
()
gevent
.
wait
()
delay
=
time
.
time
()
-
start
print
'Running "time.sleep(1)" 4 times with 3 threads. Should take about 2 seconds: %.3fs'
%
delay
gevent/__init__.py
View file @
0a5df698
...
...
@@ -29,7 +29,7 @@ __all__ = ['get_hub',
'signal'
,
'fork'
,
'reinit'
,
'
run
'
]
'
wait
'
]
import
sys
...
...
@@ -50,5 +50,8 @@ except ImportError:
__all__
.
remove
(
'fork'
)
def
run
(
timeout
=
None
,
event
=
None
):
def
wait
(
timeout
=
None
,
event
=
None
):
return
get_hub
().
join
(
timeout
=
timeout
,
event
=
event
)
run
=
wait
# XXX to be deleted (soon)
greentest/testrunner.py
View file @
0a5df698
...
...
@@ -67,7 +67,7 @@ def run_many(tests, expected=None):
for
name
,
cmd
,
options
in
tests
:
total
+=
1
spawn
(
run_one
,
name
,
cmd
,
**
options
)
gevent
.
run
()
gevent
.
wait
()
except
KeyboardInterrupt
:
try
:
if
pool
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment