Skip to content

Revert "Omnibus to implement CFRunLoop with kevent." #4621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Aug 9, 2022

Reverts #3004

The change seems to have caused a regression on Windows between 9bc1a18...5f57e70

@compnerd
Copy link
Member Author

compnerd commented Aug 9, 2022

@swift-ci please test

@3405691582
Copy link
Member

I'd suggest seeing if setting __CFNanosecondsToTSR to just return ns solves the regression on Windows, as the base code is problematic as written anyway (see #4220).

@3405691582
Copy link
Member

3405691582 commented Aug 9, 2022

Actually, since __CFTSRRate = 1.0e7 on Windows, it probably should be something like:

static inline uint64_t __CFNanosecondsToTSR(uint64_t ns) {
#if TARGET_OS_MAC || TARGET_OS_LINUX
    return ns;
#elif TARGET_OS_WINDOWS
    CFTimeInterval ti = ns / 1.0E7;
    return __CFTimeIntervalToTSR(ti);
#else
    CFTimeInterval ti = ns / 1.0E9;
    return __CFTimeIntervalToTSR(ti);
#endif
}

@compnerd compnerd closed this Aug 10, 2022
@compnerd compnerd deleted the revert-3004-RunLoopWithKevent branch August 10, 2022 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants