Commit graph

176 commits

Author SHA1 Message Date
k-hara
e76d200dfa Fix line wrap (based on column <= 120) 2013-02-24 12:02:40 +09:00
k-hara
acbfceff78 Fix incorrect indentation 2013-02-24 12:02:38 +09:00
k-hara
b08ffbd6b5 Remove trailing spaces 2013-02-24 12:02:36 +09:00
k-hara
651f09f0d8 Fix undefined identifier error 2013-02-24 12:02:34 +09:00
dsimcha
cdc2596eb6 Fix incorrect test. Calling finish(false) doesn't guarantee that the task won't be complete immediately after finish() returns. 2012-12-08 10:19:54 -05:00
k-hara
01df2f60be Remove redundant parenthesis for getters, and use assignment syntax for setters 2012-11-23 15:07:17 +09:00
dsimcha
d4cce7be56 Fixes Issue 8849: std.parallelism.executeInNewThread with thread priority segfaults 2012-10-18 14:35:54 -04:00
Jameson Little
bb03a77219 Update std/parallelism.d 2012-10-12 22:00:19 -06:00
dsimcha
172bca14f8 Call executeWorkLoop() from startWorkLoop() like I meant to all along. This should fix the unittest failures. 2012-08-25 19:21:15 -04:00
dsimcha
9ad6be42ba Exception -> Error when submitting to a finishing pool, weird, useless behavior when calling finish() from a worker thread -> deterministic deadlock because it's the least bad solution. 2012-08-25 11:31:17 -04:00
dsimcha
ab9691df2e Fix Bug 8582. 2012-08-24 22:47:49 -04:00
dsimcha
ee3b2b06a3 Improvements to std.parallelism docs: Add source link, improve formatting of examples. 2012-07-25 21:39:03 -04:00
Denis Shelomovskij
64f93b970a Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-11 12:58:40 -07:00
jmdavis
02931eb501 Revert "Merge pull request #664 from denis-sh/add-ArrayTarget-template"
This reverts commit f4d0a49493, reversing
changes made to 3cb69914c5.

The merging of request #664 was accidental, and it should not have been
merged. See https://github.com/D-Programming-Language/phobos/pull/664
for details.
2012-07-11 11:49:28 -07:00
Denis Shelomovskij
00c0d61403 Replace typeof(<type>.init[0]) with templates
* ArrayTarget (12)
2012-07-06 13:38:06 +04:00
Denis Shelomovskij
ea6c9be477 Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-06 13:27:07 +04:00
dsimcha
31276a518d Remove incorrect assert. 2012-06-17 15:18:34 -04:00
John Belmonte
01cd4f3eed Issue 8214 - blocking option for TaskPool.finish()
Add backwards compatible blocking option to finish().  Remove disabled
join() method.  Add unit tests for finish().
2012-06-17 08:53:20 -04:00
k-hara
af9ea3465c Move implementation templates into template local scope 2012-01-29 20:37:48 +09:00
Jonathan M Davis
5de415c4e1 Merge pull request #349 from donc/killsqrthack
Remove the undocumented sqrt(2) hack
2012-01-20 22:49:24 -08:00
dsimcha
c7dd245dc4 Remove workarounds for lack of non-ref opApply in parallel foreach, now that Bug 2443 is fixed. 2012-01-08 22:59:53 -05:00
dsimcha
ce949a2eb4 Make std.parallelism conform better to the Phobos style guide. Note that this was mostly done with an automated tool with a quick scroll-through to clean up its errors. At any rate, it's better than it was. 2012-01-08 22:52:51 -05:00
Walter Bright
380ae65511 remove empty statements 2011-12-29 00:05:45 -08:00
k-hara
17e87a472d Revert "Revert "Merge pull request #284 from 9rnsr/fix6208_on_inout""
This reverts commit fef20ede25.
2011-12-15 17:34:09 +09:00
David Simcha
9d151ac1f9 Make Task.base public because it doesn't work anymore on 2.057 if it's private. 2011-12-09 12:09:15 -05:00
Don Clugston
68926058a8 Remove the undocumented sqrt(2) hack
As discussed in the newsgroup:
http://www.digitalmars.com/d/archives/digitalmars/D/sqrt_2_must_go_146998.html
2011-12-05 15:07:25 +01:00
Denis Shelomovskij
e8712ed9e1 Documentation and struct staticness in std.algorithm fixes 2011-11-14 17:10:19 +03:00
k-hara
fef20ede25 Revert "Merge pull request #284 from 9rnsr/fix6208_on_inout"
This change will be required after finxing bug6208.

This reverts commit e669812d26, reversing
changes made to 5ffd5b34e8.
2011-10-13 12:44:45 +09:00
k-hara
42324e028b fix6208 on inout 2011-10-02 22:08:46 +09:00
dsimcha
9d216b9b64 Fix segfault on terminating daemon threads in std.parallelism. 2011-09-14 23:07:26 -04:00
David Simcha
dea92be80f Trivial 64-bit fix. 2011-09-04 00:41:41 -03:00
David Simcha
d9dee79403 Get rid of blank line. 2011-09-04 00:30:38 -03:00
dsimcha
bac1951c82 Fix some formatting issues, add back a compile time check to Map (again, I have no idea when/how it got removed). 2011-09-03 23:26:55 -04:00
dsimcha
e357f1afcc Fix Bug 6587: Task doesn't work with const/immutable. 2011-09-03 11:24:31 -04:00
dsimcha
ad78c48059 De-cruftification, removal of confusing/ugly stuff that existed for reasons that no longer apply. Changes to implementation details only. 2011-09-02 00:15:56 -04:00
David Simcha
a6d51dbeee Fix trivial error in safe scoped tasks. I guess noone uses these if it went undetected for so long. 2011-09-01 10:37:41 -03:00
dsimcha
b9a8eea8ec Add tests for exception handling, clarify a detail of how it's handled for asyncBuf and map. 2011-09-01 01:23:03 -04:00
dsimcha
aff1024741 Remove nonsensical line that created subtle exception chaining bug and was put in while debugging. 2011-08-29 20:38:21 -04:00
dsimcha
31b3b8e0f3 Add back buffer swapping optimization and check to parallel foreach that I forgot about during all the refactoring. 2011-08-25 01:01:32 -04:00
dsimcha
aac4f669db Massive improvements to the implementation of parallel foreach and amap. When working on std.parallel_algorithm, I discovered a way of doing these that was so much simpler, more elegant, more efficient and less bug-prone that I wanted to completely rip up the old implementation. Also, a few minor cleanups:
1.  amap now can use any random access assignable range for output, not just an array.

2.  map now statically disallows the buffer recycling overload of asyncBuf as input, since this never worked correctly.

3.  Improved memory management for reduce to avoid the GC.
2011-08-24 22:10:54 -04:00
dsimcha
bbaa7e1f7a Clarify the buffer recycling of the new load of std.parallelism.asyncBuf and disallow using this overload with map because it's not safe. At some point it may be possible to special-case this overload of asyncBuf to work with map and parallel foreach, but until I decide what the best way to do that is and get around to implementing it, it should just be an error. 2011-08-18 10:11:19 -04:00
dsimcha
097bc05491 Fix unittest pursuant to Andrei's comments. 2011-08-14 00:19:16 -04:00
dsimcha
40664e473a Attempt 2: Add an asyncBuf overload for the case where data is being read into a buffer, and the buffer is to be recycled instead of reallocated. An example of this is by-line or by-chunk file I/O. Also fix two related edge-case bugs in TaskPool.map and the other overload of TaskPool.asyncBuf. 2011-08-13 23:46:51 -04:00
dsimcha
3d5e64ae1e Revert "Add an asyncBuf overload for the case where data is being read into a buffer, and the buffer is to be recycled instead of reallocated. An example of this is by-line or by-chunk file I/O. Also fix two related edge-case bugs in TaskPool.map and the other overload of TaskPool.asyncBuf."
This reverts commit 382380cff9.

Conflicts:

	std/parallelism.d
2011-08-13 23:40:38 -04:00
dsimcha
67223d7a12 Merge branch 'master' of https://github.com/D-Programming-Language/phobos 2011-08-13 23:29:24 -04:00
jmdavis
0ec7697819 Fixed enum values in std.traits to follow Phobos naming conventions. 2011-08-13 00:14:13 -07:00
dsimcha
310e36cb89 Put the static assert in the right place. 2011-08-09 21:38:34 -04:00
dsimcha
382380cff9 Add an asyncBuf overload for the case where data is being read into a buffer, and the buffer is to be recycled instead of reallocated. An example of this is by-line or by-chunk file I/O. Also fix two related edge-case bugs in TaskPool.map and the other overload of TaskPool.asyncBuf. 2011-08-09 21:33:39 -04:00
David Simcha
5579b99149 Fix a typo in the std.parallelism docs. 2011-08-08 12:26:37 -03:00
dsimcha
0eef9059dd Made std.parallelism.TaskPool.workerIndex public and documented. 2011-08-06 11:38:15 -04:00