Commit graph

206 commits

Author SHA1 Message Date
Boris Carvajal
276053dd07
Remove a few uses of fully qualified names that rely on a DMD bug 2021-02-22 08:16:13 -03:00
Iain Buclaw
87e5ab73b8 std.parallelism: Use core.sys.platform.sys.sysctl module 2021-02-02 14:03:18 +01:00
Iain Buclaw
c6c8b12852 Implement missing OpenBSD ports in phobos 2021-02-01 18:46:54 +01:00
Bernhard Seckinger
9cb7755041 Replace approxEqual with isClose 2021-01-28 10:39:50 +01:00
Martin Kinkelin
1a459c5996 Get rid of std.conv.emplace[Ref](), use core[.internal].lifetime
The emplace() stuff was moved to druntime; for some reason, it's still
in Phobos.

I've diffed the two versions, and they are still almost identical (incl.
unittests); the druntime version appears to have seen some improvements
(e.g., forwarding r/lvalueness of the arguments) in the meantime.
2021-01-17 16:02:25 +01:00
Geod24
04f3979317 Replace 'Issue XXX' with Bugzilla links
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Jacob Carlborg
b74159e19c Fix totalCPUsImpl for iOS derived platforms 2020-03-03 12:51:07 +01:00
Alexandru Militaru
bb62aaca3d Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest 2020-01-19 14:05:17 +02:00
Bernhard Seckinger
170107cc14 Fix Issue 10126 - Make TaskPool terminate on its own or improve docs 2019-11-14 17:34:42 +01:00
Bernhard Seckinger
97abb91952 Fix Issue 10902 - some phobos unittests take an excessive amount of time 2019-11-12 20:21:03 +01:00
Bastiaan Veelo
9419f57348
Make task() example compilable.
This example seems to not have worked ever.

You cannot create a delegate to an uninstantiated template function, and for the task() template function to be able to deduce a
function, all optional parameters to read() need to be given.

The delegate issue is kind of obvious. The default parameter issue I don't know whether is a compiler limitation that could be lifted or not.

These fixes make the example less pretty, especially compared to the example of the other overload of task(), but is it how it is.

Runnable variant: https://run.dlang.io/is/WAns8z (not for publication)
2019-09-25 11:43:13 +02:00
David Gileadi
775bcdee51 Turn on -preview=markdown 2019-07-04 10:28:30 -07:00
RazvanN7
2669a2b565 Fix 2 more cases 2019-06-27 16:40:04 +03:00
Hiroki Noda
d17f2eb9f2 Fix Issue 19513 - Use sched_getaffinity(2) to get the number of CPU
cores if available

Currently std.parallelism.totalCPUs is implemented by
sysconf(_SC_NPROCESSORS_ONLN) on Posix platoform. However, on GNU/Linux,
usable number of processors may be restricted if a process runs in
container. In case it's better to use sched_getaffinity(2).

ref: http://man7.org/linux/man-pages/man1/nproc.1.html
2019-05-24 14:30:05 +09:00
Walter Bright
ae16dadfaa add isLvalue() to prepare for rvalue ref 2019-05-18 17:29:00 -07:00
tibi77
7ae2e67a47 Remove redundant body of @disable functions. Issue 14854 DMD (#6893)
Remove redundant body of @disable functions. Issue 14854 DMD
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-03-06 02:00:04 +01:00
Nathan Sashihara
6ffd4e7f28 Replace imports of core.sys.windows.windows to speed up compilation 2018-12-17 21:03:31 -05:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Basile Burg
db819575f1 Fix issue 11959 - Set private symbols declared in version(unittest) blocks 2018-08-26 10:22:11 +02:00
Sebastian Wilzbach
3f44a4cd73 Fix issue 17019 - std.algorithm.iteration.each should be usable with parallel 2018-08-01 16:25:26 +02:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
The Dlang Bot
e13e3889ac
Merge pull request #6435 from JackStouffer/input-range-link
Make references to input ranges a link to isInputRange
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-04-15 01:42:45 +02:00
Steven Schveighoffer
d4a35f09da More removal of version(unittest) 2018-04-13 12:20:02 -04:00
Jack Stouffer
e14f89e170 Make references to input ranges a link to isInputRange 2018-04-08 16:19:57 -04:00
Sebastian Wilzbach
6f766dce5d Remove redundant 'static' storage classes 2018-04-05 13:11:48 +02:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
The Dlang Bot
fa0a6192a1
Merge pull request #5951 from acehreli/TaskPool_fold
Fix Issue 18096 - Add fold() to std.parallelism
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-01-17 06:05:48 +01:00
Andrei Alexandrescu
c1c8e8681e
remove surprising emtpy line 2018-01-16 11:58:56 -05:00
Walter Bright
b8291f2d5d std.parallelism: replace explicit code with Throwable.chainTogether() 2018-01-09 00:57:16 +01:00
Ali Çehreli
f9e3dde2bb Use string lambdas in non-documentation unittests to reduce memory usage of dmd 2017-12-28 22:56:23 -08:00
Ali Çehreli
8cfff5e810 Use message with static assert(0), use aliases instead of nested functions, do not use format in CTFE, add more unit tests. 2017-12-26 23:47:12 -08:00
Ali Çehreli
665e4adbce Implement std.parallelism.fold with static if branches instead of with template specializations 2017-12-26 22:40:48 -08:00
Ali Çehreli
673c4e959d Apply review comments: Backticks for inline code, StdUnittest, etc. 2017-12-26 22:40:48 -08:00
Ali Çehreli
c472b2303d Fix Issue 18096 - Add fold() to std.parallelism 2017-12-26 22:40:48 -08:00
Diederik de Groot
31ca73d58d
Port of phobos to DragonFlyBSD
Notes:
- FIXME message related to dragonfly malloc issue (issue reported on upstream dragonfly issue database)
2017-12-20 08:05:49 +01:00
Sebastian Wilzbach
c47c950d84 Manually replace body with do in std.parallelism 2017-11-20 15:33:52 +01:00
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Andrei Alexandrescu
746b9e82f1 Fix visibility issue 2017-10-27 08:11:26 -04:00
Andrei Alexandrescu
4f9b7efbf4 Propagate safety properly 2017-10-26 16:38:41 -04:00
Andrei Alexandrescu
286930a99c Review 2017-10-26 12:10:14 -04:00
Andrei Alexandrescu
58c4f7deed Eliminate static shared this from std/parallelism.d 2017-10-25 17:41:26 -04:00
The Dlang Bot
c0652345e9 Merge pull request #5502 from wilzbach/fix-17539
Fix Issue 17539 - std.parallellism.parallel triggers 'statement not reachable'
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2017-07-04 22:18:10 +02:00
Sebastian Wilzbach
339308b829 Add // nocoverage to non-deterministically covered lines 2017-07-03 23:36:15 +02:00
Sebastian Wilzbach
f3770ba1d6 Fix Issue 17539 - std.parallellism.parallel triggers 'statement not reachable' 2017-06-21 09:58:21 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Vladimir Panteleev
76c6dcc984 Allow ignoring individual lines for coverage analysis
This adds a work-around to the non-deterministic coverage fluctuations
in std.parallelism. Lines with `nocoverage` on them will be excluded
from coverage analysis, and be considered as not containing any code.
2017-05-07 15:26:25 +00:00