---
title: "CFRunLoopCopyCurrentMode(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunloopcopycurrentmode(_:)"
---

# CFRunLoopCopyCurrentMode(_:)

Returns the name of the mode in which a given run loop is currently running.

## Declaration

```swift
func CFRunLoopCopyCurrentMode(_ rl: CFRunLoop!) -> CFRunLoopMode!
```

## Parameters

- `rl`: The run loop to examine.

## Return Value

Return Value The mode in which rl is currently running; NULL if rl is not running. Ownership follows the The Create Rule.

## Discussion

Discussion When run on the current thread’s run loop, the returned value identifies the run loop mode that made the callout in which your code is currently executing.

## See Also

### Managing Run Loop Modes

- [CFRunLoopAddCommonMode(_:_:)](corefoundation/cfrunloopaddcommonmode(_:_:).md)
- [CFRunLoopCopyAllModes(_:)](corefoundation/cfrunloopcopyallmodes(_:).md)
