On 9/7/06, glyph@divmod.com <glyph@divmod.com> wrote:
On Thu, 7 Sep 2006 15:01:08 -0400, James Y Knight <foom@fuhm.net> wrote:
However, even though it'd be possible to fix, perhaps it is better to simply throw an exception on the second reactor.run(), since most people who do that shouldn't actually be running the reactor twice, they just didn't know the better thing to do yet.
I think that's a good idea. Based on the nature of the questions that I've seen, I think that this would probably be a good idea even if we *did* have a restartable reactor. Add an interface, IRestartableReactor, and require people who want to use it to call 'reactor.restart()'. While this might not actually *do* anything, the conspicuous absence of it from any example code and a potentially useful error message from reactor.run would prevent the question from being asked repeatedly...
I've added this to the tracker [http://twistedmatrix.com/trac/ticket/2066], further discussion should probably be taken there.