Skip to content

Foundation: port NSThread to Windows #1856

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

Merged
merged 2 commits into from
Jan 30, 2019

Conversation

compnerd
Copy link
Member

Implement the Thread interfaces for Windows. Extend the CoreFoundation
interface to support thread stack reservation sizing.

@compnerd
Copy link
Member Author

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@jrose-apple - suggestions as to what may be the cause of the deserialization issue?

@jrose-apple
Copy link
Contributor

Does SwiftFoundation on Mac use the system CoreFoundation?

@phausler
Copy link
Contributor

It better not be using the system CF. The layout of the objects are different (and we have functions with differing signatures etc)

@jrose-apple
Copy link
Contributor

Hm, good point. We probably would have noticed that a long time ago.

Maybe the CoreFoundation overlay is causing problems? Do we need a SwiftCoreFoundation?

@compnerd
Copy link
Member Author

@phausler agreed ... that would be really bad, right, I didn't consider that (sorry, dealing with Linux, Android, and Windows a lot atm, so keep forgetting that Darwin has CF there)

@jrose-apple
Copy link
Contributor

Or is _CFThreadRef only defined when certain macros are passed? If that's the case, it can't be used in a stored property (yet).

@phausler
Copy link
Contributor

_CFThreadRef is only defined in the SCLF version of CF. The Darwin CF does not have such a notion.(also that typedef is private anyhow)

@compnerd
Copy link
Member Author

Woah, I think @phausler is on to something ... I think that it is using the system CF. This is not in the Foundation build, but in XCTest.

@compnerd
Copy link
Member Author

Hmm, could it be a difference between the Xcode and the CMake build? It seems from the jenkins build that this is being invoked from xcodebuild.

@phausler
Copy link
Contributor

Hm, good point. We probably would have noticed that a long time ago.

Maybe the CoreFoundation overlay is causing problems? Do we need a SwiftCoreFoundation?

renaming it to SwiftCoreFoundation has other issues that crop up. We tried that early on in the initial bring-up of SCLF. It failed pretty horribly then, but perhaps with alot of work it could be done now that things are not so much in flux as they were back then?

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

Implement the Thread interfaces for Windows.  Extend the CoreFoundation
interface to support thread stack reservation sizing.
The compiler is working hard to keep the type sugar on the interface for
even an internal interface.  The type sugar being preserved causes a
deserialization failure on Darwin.  Use an equivalent local typealias to
avoid the issue.  SR-9811
@compnerd
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 536f4b8 into swiftlang:master Jan 30, 2019
@compnerd compnerd deleted the thread-the-needle branch January 30, 2019 17:18
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.

6 participants