  //============================================================================
  /** Add a function call without synchronizing.

      Parameters are evaluated immediately, then the resulting functor is added
      to the queue. This is used to postpone the call to synchronize() when there
      would be adverse side effects to executing the function immediately. In this
      example, we use queue() instead of call() to avoid a deadlock.

      @code

      struct SharedState;           // contains data shared between threads

      ConcurrentState <SharedState> sharedState;

      void stateChanged ()
      {
        ConcurrentState <SharedState>::ReadAccess state (sharedState);

        // (access state)
      }

      CallQueue fifo;

      void changeState ()
      {
        ConcurrentState <State>::WriteAccess state (sharedState);

        // (modify state)

        fifo.call (&stateChanged);  // BUG: DEADLOCK because of the implicit synchronize().

        fifo.queue (&stateChanged); // Okay, synchronize() will be called later,
                                    // after the write lock is released.
      }

      @endcode

      @param f The function to call followed by up to eight parameters, evaluated
                immediately. The parameter list must match the function signature.
                For class member functions, the first argument must be a pointer to
                the class object.

      @see call
  */
  template <class Fn>
  void queue (Fn f)
  {
    queuef (vf::bind (f));
  }
