TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

macOS CFRunLoop Internals: Scheduling High-Precision Timers and Recurring Tasks

1 pointsby jclayalmost 2 years ago

1 comment

jclayalmost 2 years ago
This is the first in a series of posts I have planned about working with low-level run loop APIs provided by the CoreFoundation C library. I demonstrate how they can be used in a C++ app by building up some higher level abstractions and RAII wrappers.<p>The next post I have planned goes over how to use the CFRunLoop to post cross-thread tasks, and will include some benchmarks comparing with an alternative C++ lock-free SPSC task queue implementation.