From e1043bed2450f77ca1a19226fc4fe9c2bf953f2a Mon Sep 17 00:00:00 2001 From: Ovidiu Predescu Date: Tue, 12 Jul 2011 12:04:26 -0700 Subject: [PATCH] Added author and copyright info. --- tornado/test/twistedreactor_test.py | 19 +++++++++++++++++++ tornado/twisted/reactor.py | 29 ++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/tornado/test/twistedreactor_test.py b/tornado/test/twistedreactor_test.py index 410e76fb9..e82af3a2a 100644 --- a/tornado/test/twistedreactor_test.py +++ b/tornado/test/twistedreactor_test.py @@ -1,3 +1,22 @@ +# Author: Ovidiu Predescu +# Date: July 2011 +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +""" +Unittest for the twisted-style reactor. +""" + import fcntl import os import sys diff --git a/tornado/twisted/reactor.py b/tornado/twisted/reactor.py index e5f7444a0..0b6d02f6d 100644 --- a/tornado/twisted/reactor.py +++ b/tornado/twisted/reactor.py @@ -1,4 +1,28 @@ -# System imports +# Author: Ovidiu Predescu +# Date: July 2011 +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +""" +A twisted-style reactor for the Tornado IOLoop. + +To use it, add the following to your twisted application: + +import tornado.twisted.reactor +tornado.twisted.reactor.install() +from twisted.internet import reactor +""" + import errno, functools, sys import time @@ -14,6 +38,9 @@ import tornado.ioloop from tornado.ioloop import IOLoop class TornadoDelayedCall(object): + """ + DelayedCall object for Tornado. + """ implements(IDelayedCall) def __init__(self, reactor, seconds, f, *args, **kw): -- 2.47.3