Contents

schedule(in:forMode:)

Adds the service to the specified run loop.

Declaration

func schedule(in aRunLoop: RunLoop, forMode mode: RunLoop.Mode)

Parameters

  • aRunLoop:

    The run loop to which to add the receiver.

  • mode:

    The run loop mode to which to add the receiver. Possible values for mode are discussed in the “Constants” section of Runloop.

Discussion

You can use this method in conjunction with remove(from:forMode:) to transfer a service to a different run loop. You should not attempt to run a service on multiple run loops.

See Also

Managing Run Loops