Permalink
Browse files

Remove references to unused serializers, get rid of not-quite-valid

optimization for wakeups.
  • Loading branch information...
1 parent ffa3fc3 commit 9d746d0e7874ca6c75bc889e6dbc555c7f7149b9 @rjpower committed Nov 16, 2012
Showing with 4 additions and 11 deletions.
  1. +2 −2 setup.py
  2. +0 −2 src/rpc/common.py
  3. +1 −6 src/rpc/poller.py
  4. +1 −1 tests/test_rpc.py
View
@@ -4,14 +4,14 @@
setup(
name = "speedy",
description="Fast, non-blocking JSON based RPC system.",
- version = "0.18",
+ version = "0.19",
author="Russell Power",
author_email="power@cs.nyu.edu",
license="BSD",
url="http://github.com/rjpower/speedy",
package_dir = { '' : 'src' },
packages = ['rpc'],
- install_requires = [ 'PyYAML', 'jsonpickle', ],
+ install_requires = [],
long_description='''
Speedy - A Fast RPC System for Python
=====================================
View
@@ -1,7 +1,5 @@
-import jsonpickle
import socket
import traceback
-import yaml
import cPickle
class RemoteException(object):
View
@@ -25,8 +25,6 @@ def __init__(self, name = 'EPollWorker'):
fl = fcntl.fcntl(self._wake_pipe_r, fcntl.F_GETFL)
fcntl.fcntl(self._wake_pipe_r, fcntl.F_SETFL, fl | os.O_NONBLOCK)
- self._awake = False
-
self._epoll.register(self._wake_pipe_r)
self._thread = threading.Thread(name = name, target = self.run)
self._thread.setDaemon(True)
@@ -55,8 +53,7 @@ def unregister(self, fd):
del self._sockets[fd]
def wakeup(self):
- if not self._awake:
- os.write(self._wake_pipe_w, '*')
+ os.write(self._wake_pipe_w, '*')
def run(self):
while self._running:
@@ -74,9 +71,7 @@ def run(self):
def _poll_loop(self):
while self._running:
# logging.debug('Polling %d objects...', len(self._sockets))
- self._awake = False
events = self._epoll.poll(0.1)
- self._awake = True
for fd, ev in events:
try:
View
@@ -75,6 +75,6 @@ def run(self):
assert t.result == 'Test%d' % i
if __name__ == '__main__':
- unittest.run()
+ unittest.main()
# import cProfile
# cProfile.run('unittest.main()', 'profile.out')

0 comments on commit 9d746d0

Please sign in to comment.