Non-blocking publishing in Python
[email protected] Sun, 3 Apr 2005 13:03:51 -0500
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello: I'm trying to use the apps/publish.py module as a starting point for writ= ing my own simple publishing lib to work with repubsub. The script runs fine on = its own, but whenever I try to embed it in other code, I seem to get blocking issues and the CPU load spikes. Inside the apps/publish.py script, I looked at the following method calls= : asyncore.poll() scheduler.timeout() scheduler.run() Now Python's asyncore does not have documentation on the poll function, a= lthough in my interpreter, I do see a reference for poll. The two scheduler funct= ion calls both pass in their implementations. If I comment out that loop, my messages don't get published. So what's going on here?=20 Ideally, I'd like to be able to use Twisted's Deferred mechanism to handl= e the blocking issue, but I'm unsure the best way to approach it without heavil= y modifying the code base. Any help is greatly appreciated. Thanks, Brian --=20 =3D=3D=3D=3D brian lee dae yung biomimetic art and research mux space . com ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick