core.thread refactor: osthread module#2689
core.thread refactor: osthread module#2689dlang-bot merged 19 commits intodlang:masterfrom baziotis:osthread
Conversation
|
You should start by moving It will be much easier to keep track of things that way. |
|
Ok, I just didn't get the last phrase:
|
|
some symbols in core.thread are private. When you move symbol around that require access to those symbols, as they are now in different modules they will give an error if used. making those symbols |
|
Ok, thanks. I didn't know that there's the |
|
@baziotis thanks for working on this! I will try to review your later today or tomorrow. |
|
@ZombineDev Don't mention it. It might seem like a big PR but it's actually not. I just moved the OS-dependent stuff from |
@thewilsonator 's proposal was to start with something else. And IMO it makes a lot of sense. |
|
@Geod24 To be honest, I'm not sure what is your point. This PR is a draft because it is not supposed to be merged as it is. It basically asks "have I moved the correct amount of things (i.e. the OS stuff) from |
In this case, no, because there should be a (roughly) equal amount of code removed. |
|
Can I have some help on why the tests are failing? I can't seem to find a way to fix them. |
I think you forgot to add thread/package.d to the make files. |
I thought it wasn't needed, thanks for the response. I added in all but DOCS. Unfortunately, it doesn't seem to fix the error. |
The error is different now. You've got a merge conflict in mak/DOCS. You need to rebase. |
Yes, I had this error in the previous commit as well. But, besides this, there's also the previous error for example in circleci. |
… anyone else finds them helpful
|
Oh crap, I thought Edit: Should this somehow be undone or is it supposed to be that way? |
|
Thanks for your pull request and interest in making D better, @baziotis! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2689" |
Supposed to be that way. |
|
There are a couple of things I'd like to see changed, but theres no point keeping thins waiting any further. |
You can tell me. :) |
|
#2689 (comment) For the next one split out the context stuff into |
Yes as said here: #2689 (comment)
Haha yes I don't compile it. As you can see from this PR there are a lot of subtle things |
|
Indeed, I look forward to it. |
|
As one of the tests failing in https://dev.azure.com/dlanguage/dmd/_build/results?buildId=4590 and other PRs is runnable/test15779.d which checks exceptions in fibers, I suspect it has been introduced by this PR. Any idea what might be causing this? Apart from the auto tester, druntime just runs a partial win64 test on Appveyor. @wilzbach Can we easily run the azure tests from dmd for druntime, too? |
|
Indeed, the disabled unittests look very similar. I have failed to reproduce the issues reported by the azure CI locally, will try the unittests tonight. |
|
Of note, that test enables stack stomping. |
|
Follow-up: #2821 |
This is the start of an effort to refactor
core.thread. With Nicholas Wilson's help, this takes the form of a separate folder that will splitthreadto modules. Currently, the plan is to split it to:osthread: Low-level, OS-dependent code for threads.fiber: The interface for fibers.context: The stack context needed for threads and fibers.osthreadseems to be the easiest to start from so that the review is easier.