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
63f671d1
Commit
63f671d1
authored
Jul 26, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webpy.py: use time.sleep instead of gevent.sleep
parent
6d8ee5fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/webpy.py
examples/webpy.py
+2
-2
No files found.
examples/webpy.py
View file @
63f671d1
...
...
@@ -3,7 +3,7 @@
from
gevent
import
monkey
;
monkey
.
patch_all
()
from
gevent.pywsgi
import
WSGIServer
import
gevent
import
time
import
web
urls
=
(
"/"
,
"index"
,
...
...
@@ -22,7 +22,7 @@ class long_polling:
# becomes greenlet-local storage thus making requests isolated as they should be.
def
GET
(
self
):
print
'GET /long'
gevent
.
sleep
(
10
)
# possible to block the request indefinitely, without harming others
time
.
sleep
(
10
)
# possible to block the request indefinitely, without harming others
return
'Hello, 10 seconds later'
if
__name__
==
"__main__"
:
...
...
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