This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/urs/bin/env python2.7 | |
| #coding: utf-8 | |
| """Test the usage of 'gevent.event.Event' class. | |
| """ | |
| import random | |
| import gevent | |
| from gevent.event import Event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2.7 | |
| #coding: utf-8 | |
| import gevent | |
| from gevent import Greenlet | |
| class MyGreen(Greenlet): | |
| def __init__(self, timeout, msg): | |
| Greenlet.__init__(self) | |
| self.timeout = timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2.7 | |
| #coding: utf-8 | |
| import gevent | |
| class TestMainCo(object): | |
| def __init__(self, mtimeout=2, gtimeout=3, numtasks=10): | |
| self.mtimeout = mtimeout | |
| self.gtimeout = gtimeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python2.7 | |
| # coding: utf-8 | |
| import gevent | |
| class TestSchedule(object): | |
| def __init__(self, timeout=1, numtasks=10): | |
| self.timeout = timeout | |
| self.numtasks = numtasks |
NewerOlder