How can I create a script that runs continuously but does not block the interface? I would like to create a script that runs constantly throughout the life of a Blender session.  The problem is that Blender's interface "blocks" while the script is running.  As a trivial example, if I run the code below:

while True:
    continue


Then Blender freezes up, and I have to use xkill to stop it.  How may I create a script that may be running constantly but does not stop Blender from functioning normally?
What you are looking for is to create a modal operator. From the Wiki:


  A modal operator defines a Operator.modal function which running,
  handling events until it returns {'FINISHED'} or {'CANCELLED'}. Grab,
  Rotate, Scale and Fly-Mode are examples of modal operators. They are
  especially useful for interactive tools, your operator can have its
  own state where keys toggle options as the operator runs.


There is a template for the Modal Operator accessible from the Blender Text Editor.