<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopActivity",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@E@CFRunLoopActivity"
  },
  "title" : "CFRunLoopActivity"
}
-->

# CFRunLoopActivity

Run loop activity stages in which run loop observers can be scheduled.

```
struct CFRunLoopActivity
```

## Overview

The run loop stages in which an observer is scheduled are selected when the observer is created with [`CFRunLoopObserverCreate(_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFRunLoopObserverCreate(_:_:_:_:_:_:)).

## Topics

### Constants

[`entry`](/documentation/CoreFoundation/CFRunLoopActivity/entry)

The entrance of the run loop, before entering the event processing loop. This activity occurs once for each call to [`CFRunLoopRun()`](/documentation/CoreFoundation/CFRunLoopRun()) and [`CFRunLoopRunInMode(_:_:_:)`](/documentation/CoreFoundation/CFRunLoopRunInMode(_:_:_:)).

[`beforeTimers`](/documentation/CoreFoundation/CFRunLoopActivity/beforeTimers)

Inside the event processing loop before any timers are processed.

[`beforeSources`](/documentation/CoreFoundation/CFRunLoopActivity/beforeSources)

Inside the event processing loop before any sources are processed.

[`beforeWaiting`](/documentation/CoreFoundation/CFRunLoopActivity/beforeWaiting)

[`afterWaiting`](/documentation/CoreFoundation/CFRunLoopActivity/afterWaiting)

Inside the event processing loop after the run loop wakes up, but before processing the event that woke it up. This activity occurs only if the run loop did in fact go to sleep during the current loop.

[`exit`](/documentation/CoreFoundation/CFRunLoopActivity/exit)

The exit of the run loop, after exiting the event processing loop. This activity occurs once for each call to [`CFRunLoopRun()`](/documentation/CoreFoundation/CFRunLoopRun()) and [`CFRunLoopRunInMode(_:_:_:)`](/documentation/CoreFoundation/CFRunLoopRunInMode(_:_:_:)).

[`allActivities`](/documentation/CoreFoundation/CFRunLoopActivity/allActivities)

A combination of all the preceding stages.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)