Skip to content

Conversation

@burner
Copy link
Member

@burner burner commented Jun 1, 2016

No description provided.

@burner burner force-pushed the parallelism_selectiv_imports branch from d1e053b to b74e30c Compare June 2, 2016 08:12
import std.typecons;
import core.thread : Thread;

import std.traits : ReturnType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment these symbols out, selective imports are not allowed at module scope in Phobos yet. See related article and forum post.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

added missing import for windows

joakim-noah fix
@burner burner force-pushed the parallelism_selectiv_imports branch from b74e30c to 5246ed6 Compare June 2, 2016 12:46
@joakim-noah
Copy link
Contributor

joakim-noah commented Jun 3, 2016

There is a version block that will now break with the top-level imports gone, parallelismStressTest. I made the same mistake on my selective import pulls, will have to go back and fix those. I suggest you uncomment the line where that version is set and set the version called verboseUnittest too, then compile the unittests to make sure you didn't miss anything.

Also, I think it'd be better to move the std.stdio import out of the version(unittest) block and more narrowly scope it, as it's generally not good practice to have imports in version(unittest) blocks. Here are the remaining symbol imports that the ddmd frontend had to search for when building the unittests, along with their line numbers:

found File from std/parallelism.d:4241 in std/stdio.d:347
found File from std/parallelism.d:4256 in std/stdio.d:347
found Mutex from std/parallelism.d-mixin-3866:3869 in core/sync/mutex.d:47
found Mutex from std/parallelism.d-mixin-3878:3881 in core/sync/mutex.d:47
found Mutex from std/parallelism.d:1026 in core/sync/mutex.d:47
found _SC_NPROCESSORS_ONLN from std/parallelism.d:115 in core/sys/posix/unistd.d:819
found dur from std/parallelism.d:4167 in core/time.d:2024
found free from std/parallelism.d:2679 in core/stdc/stdlib.d:156
found free from std/parallelism.d:3436 in core/stdc/stdlib.d:156
found malloc from std/parallelism.d:2664 in core/stdc/stdlib.d:150
found malloc from std/parallelism.d:3427 in core/stdc/stdlib.d:150
found remove from std/parallelism.d:4246 in std/file.d:697
found staticMap from std/parallelism.d:1864 in std/meta.d:715
found staticMap from std/parallelism.d:2495 in std/meta.d:715
found stderr from std/parallelism.d:4294 in std/stdio.d:4306
found stderr from std/parallelism.d:700 in std/stdio.d:4306
found stderr from std/parallelism.d:721 in std/stdio.d:4306
found sysconf from std/parallelism.d:115 in core/sys/posix/unistd.d:85

Obviously that's on linux only, you could do the other OS's too if you want.

You got the other ~50- I guess by hand?- nice work on those.

@@ -3346,6 +3405,7 @@ private void submitAndExecute(
alias PTask = typeof(scopedTask(doIt));
import core.stdc.stdlib;
import core.stdc.string : memcpy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary because of the same import inside the foreach below, right? Get rid of one of them.

@burner
Copy link
Member Author

burner commented Jun 3, 2016

I just now found out, that parts of the unittests of parallism did't even compile anymore. Since isNaN is a template function ;-)
I think I first have to fix the unittests before this can be pulled. Not cool, really not cool

@burner
Copy link
Member Author

burner commented Jun 3, 2016

#4399 std.parallelism seams to be broken big time

@JackStouffer
Copy link
Contributor

Superseded by #5275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants