The ``callback_uri`` may be omitted if you have previously
registered a callback URI with the third-party service. For
- some sevices (including Friendfeed), you must use a
+ some services (including Friendfeed), you must use a
previously-registered callback URI and cannot specify a
callback via this method.
An `IOLoop` automatically becomes current for its thread
when it is started, but it is sometimes useful to call
- `make_current` explictly before starting the `IOLoop`,
+ `make_current` explicitly before starting the `IOLoop`,
so that code run at startup time can find the right
instance.
"""
# Pretend to have a pending callback so that an EOF in
# _read_to_buffer doesn't trigger an immediate close
# callback. At the end of this method we'll either
- # estabilsh a real pending callback via
+ # establish a real pending callback via
# _read_from_buffer or run the close callback.
#
# We need two try statements here so that
class TornadoReactor(PosixReactorBase):
"""Twisted reactor built on the Tornado IOLoop.
- Since it is intented to be used in applications where the top-level
+ Since it is intended to be used in applications where the top-level
event loop is ``io_loop.start()`` rather than ``reactor.run()``,
it is implemented a little differently than other Twisted reactors.
We override `mainLoop` instead of `doIteration` and must implement
try:
import multiprocessing
except ImportError:
- # Multiprocessing is not availble on Google App Engine.
+ # Multiprocessing is not available on Google App Engine.
multiprocessing = None
try:
sys.exit(1)
with StackContext(die_on_error):
- # Any exception thrown here *or in callback and its desendents*
+ # Any exception thrown here *or in callback and its descendants*
# will cause the process to exit instead of spinning endlessly
# in the ioloop.
http_client.fetch(url, callback)
ioloop.start()
-Most applications shouln't have to work with `StackContext` directly.
+Most applications shouldn't have to work with `StackContext` directly.
Here are a few rules of thumb for when it's necessary:
* If you're writing an asynchronous library that doesn't rely on a
functools.partial(self._create_stream, max_buffer_size))
af, addr, stream = yield connector.start()
# TODO: For better performance we could cache the (af, addr)
- # information here and re-use it on sbusequent connections to
+ # information here and re-use it on subsequent connections to
# the same host. (http://tools.ietf.org/html/rfc6555#section-4.2)
if ssl_options is not None:
stream = yield stream.start_tls(False, ssl_options=ssl_options,
"""Provides the errno from an Exception object.
There are cases that the errno attribute was not set so we pull
- the errno out of the args but if someone instatiates an Exception
+ the errno out of the args but if someone instantiates an Exception
without any args you will get a tuple error. So this function
abstracts all that behavior to give you a safe way to get the
errno.
impl = cls
args.update(kwargs)
instance = super(Configurable, cls).__new__(impl)
- # initialize vs __init__ chosen for compatiblity with AsyncHTTPClient
+ # initialize vs __init__ chosen for compatibility with AsyncHTTPClient
# singleton magic. If we get rid of that we can switch to __init__
# here too.
instance.initialize(**args)