Commit graph

76 commits

Author SHA1 Message Date
Andrej Mitrovic
dd9b31ccae Fixes Issue 6224 - Add ownerTid() property. 2013-01-23 00:55:23 +01:00
Andrej Mitrovic
8592a34d4b Fixes Issue 8078 - receiveOnly exceptions should be informative. 2013-01-09 16:32:27 +01:00
SHOO
aa1f8351b9 rename Spawnable to isSpawnable 2012-11-18 18:48:49 +09:00
SHOO
10f1e807b7 replaced tabs to spaces 2012-11-15 23:50:26 +09:00
SHOO
f909a18dca fix Issue 9005 - std.concurrency.spawn should allow void delegate(Args) shared for new Tid
http://d.puremagic.com/issues/show_bug.cgi?id=9005
2012-11-15 23:30:30 +09:00
alexrp
b202180295 Remove all uses of sizediff_t in favor of ptrdiff_t. 2012-10-15 04:24:09 +02:00
jmdavis
14c9a0ae44 Undocumented September deprecations.
The deprecated stuff scheduled for removal in September is now
undocumented and marked (in a normal comment) for removal in March 2013.
2012-09-30 04:15:56 -07:00
jmdavis
d283d5735c Move August removals to September.
Several deprecated items were listed for removal in August, but it's
looking likely that 2.060 will come out in August, and I'd prefer not to
have them removed for 2.060 given how many items are already in the
changelog, and they're already deprecated, so it'll only affect people
compiling with -d either way. So, I'm changing the ddoc comments to say
September instead of August. They'll be removed in 2.061.
2012-07-23 23:11:07 -07:00
nazriel
dc408e6ff4 runnable examples - std.concurrency 2012-07-15 21:50:31 +00:00
alexrp
539134396a Kill some public imports of core.sync.* in std.concurrency. 2012-05-02 04:46:54 +02:00
Daniel Kolesa
d2388cd39a Fix a bug with shadowing declaration in std.concurrency. 2012-03-08 22:51:05 -08:00
k-hara
66e13b2c27 Revert "Revert "Merge pull request #120 from 9rnsr/rvalue-struct-literal""
This reverts commit 8a6bfd2529.
2012-02-21 21:03:01 +09:00
Walter Bright
8a6bfd2529 Revert "Merge pull request #120 from 9rnsr/rvalue-struct-literal"
This reverts commit d780d9df0f, reversing
changes made to c6ae86ca4f.
2012-02-20 19:43:12 -08:00
Walter Bright
d780d9df0f Merge pull request #120 from 9rnsr/rvalue-struct-literal
Supplemental changes of dmd/pull/41
2012-02-20 19:24:39 -08:00
jmdavis
88faac2475 Moved removals of deprecated symbols from July to August.
The release didn't happen in January, so July isn't a 6 month
deprecation period anymore.
2012-02-11 02:48:49 -08:00
Sean Kelly
7be98ef0ac added 'scope' to mbox.get() param list. 2012-02-09 14:12:51 -08:00
k-hara
d3e1992d86 Add overloads for struct literal and construction that now make rvalue. 2012-01-23 23:41:45 +09:00
jmdavis
60a0a1c9e7 Deprecated stuff that was scheduled for deprecation in January 2012. 2012-01-02 22:52:36 -08:00
David Simcha
e8e92f3f99 Merge pull request #362 from klickverbot/receive-function
Issue 7092 - std.concurrency.receive does not accept free functions.
2011-12-18 10:09:20 -08:00
dsimcha
4afe6a5f3b Should be bool. 2011-12-11 13:01:40 -05:00
dsimcha
c487da7087 Use bool instead. 2011-12-11 12:40:44 -05:00
dsimcha
93ccd0cfb3 Improve the documentation for std.concurrency. 2011-12-11 12:07:13 -05:00
David Nadlinger
492eebd571 Issue 7092 - std.concurrency.receive does not accept free functions. 2011-12-10 22:20:31 +01:00
David Nadlinger
e312f9898b Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled.

std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
Sean Kelly
30c5cb3f47 replacing confusing comma expression with block statement 2011-08-03 16:42:02 -07:00
Sean Kelly
55ac8b699f Modified List(T) so the terminal put() operation is responsible for adjusting node count. Tested to still pass unittests. 2011-08-03 15:46:21 -07:00
jmdavis
09b7cf618b Adjusting deprecation dates for a July release. 2011-07-04 01:46:26 -07:00
jmdavis
708f1c16d3 Scheduled the version of receiveTimeout which takes a long for deprecation. 2011-06-26 22:16:45 -07:00
David Nadlinger
3e01490619 Fixed an off-by-one error in mailbox size handling.
The List.put(ref List) overload previously didn't increment m_count for rhs.m_front itself, leading to an underflow of m_count when removing all the messages. I suppose this didn't surface so far because m_count isn't really relevant if no mailbox size limit is set.

Also, I renamed the private put() method to appendNode() to avoid confusion as it is not really an overload semantically.
2011-06-09 16:50:15 +02:00
David Nadlinger
93c41c86a3 Expose a std.concurrency bug by running its unit test with a limited mailbox size. 2011-06-09 16:49:19 +02:00
Sean Kelly
8ae8a6d9f0 added clarifying comment for why a shared static ctor is used for a local variable. 2011-05-05 14:38:18 -07:00
Sean Kelly
628aa3a255 reverting changes that are triggering a compiler failure 2011-05-05 13:23:01 -07:00
Sean Kelly
d0e52a183c receive() now works even if thisTid() has never been called within the main thread. also applied use of Duration throughout the receiveTimeout code, since core.sync uses Duration as its native time representation internally as well. 2011-05-04 16:27:14 -07:00
Sean Kelly
f188ca8af4 Added experimental features register(), unregister(), and locate(). 2011-03-18 12:35:26 -07:00
jmdavis
0c8c1af630 Added version of receiveTimout which takes a Duration. 2011-02-18 20:26:43 -08:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Sean Kelly
94bd4f661b Issue 4307 - spawn()'ed thread doesn't terminate 2011-02-03 15:50:37 -08:00
Sean Kelly
ecc7390670 Changed thisTid to construct a MessageBox if one doesn't exist (true for the main thread and threads created with core.thread instead of spawn). This eliminates a double construction for spawned threads or the alternative of a segfault when sending to a thread not created by spawn. 2011-01-03 01:15:22 +00:00
Don Clugston
84477a5d3e Move Boost copyright declaration from ddoc to normal comment. Fixes ugly ddoc output. 2010-11-24 19:34:47 +00:00
Shin Fujishiro
3c048ac456 Migration of tup.field[k] to tup[k].
Replaced ad-hoc 'is tuple?' checks with isTuple template.

The "this._cache" change in std.range is just a workaround for bug 5046.
2010-10-13 05:39:53 +00:00
Sean Kelly
d9a37f5b47 Changed PriorityMessageException to hold a variant instead of being a template class. This is required to support priority messages received from another process, and also sidesteps a number of implementation issues with the old approach as well. The drawback is that TDPL describes prioritySend as working the old way. This change had to happen at some point however, and better now than later. Next will be to add functionality to PriorityMessageException to simplify introspection and extraction of the message contained.
Greatly simplified the code in places and tuned somewhat for performance as well.  Normal send/receive is about 25% faster now, and prioritySend is 200 times faster (yes, 20,000%).

Added a unittest or two and verified that they still pass :-p
2010-10-08 21:19:35 +00:00
Sean Kelly
125c011249 Made LinkTerminated message work like OwnerTerminated (ie. the user can trap it in a receive call). 2010-10-08 17:36:15 +00:00
Sean Kelly
b8d0976c69 Fixed unittest hang. I thought I'd already checked in this change, but I guess not. 2010-10-08 17:31:38 +00:00
Sean Kelly
96ebdb366c Fixed receive() so it properly handles functions accepting a Tuple argument. 2010-10-07 20:42:06 +00:00
Sean Kelly
5744b5000c Fixed user handling of the OwnerTerminated message so it will not always throw. 2010-10-07 14:19:04 +00:00
Sean Kelly
4bfacb565c Fixed an issue where a receive() resulting in a thrown exception caused messages to be lost. 2010-09-30 20:57:44 +00:00
Sean Kelly
e398c7b452 Fixed an issue where priority messages were being added to both the priority and the standard message queues. This improves performance by an order of magnitude or more, but still leaves priority messaging substantially slower than normal messaging. Looking for more issues. 2010-09-30 18:08:42 +00:00
Sean Kelly
0bb3ae0fe7 Eliminated use of ".field" for Tuple field access now that it's no longer necessary.
Fixed the occlusion detection for receive() so that functions returning a value (assumed to be bool) do not occlude following functions accepting the same parameter list.

Changed the handling of an OwnerTerminated message so that the OwnerTerminated exception will be thrown immediately on receipt instead of delaying the throw until a receive() is issued where the receive must block and wait for a new message to arrive.  Since message arrival is indeterminate (ie. network latency and other factors affect how long it will take for a message to arrive), there was no provable difference between the existing guarantee and the much simpler guarantee that OwnerTerminated is not thrown until all messages have been received from the owner only.  Although the early actor model didn't even require messages from a specific sender to arrive in order, experience has shown this guarantee to be too weak for practical use in many scenarios (it's equivalent to having a weak memory model in a SMP system).  So std.concurrency will guarantee that all messages from a particular sender will arrive in order and thus the OwnerTerminated message will necessarily be the last message received from the receiver's owner, so when this message is encountered an OwnerTerminated exception will be thrown immediately.

Slightly changed the handling of LinkTerminated vs. OwnerTerminated messages so that an OwnerTerminated exception will always be thrown if the sender is the recipient's owner, regardless of any existing links between the processes.  The link is broken if it exists though.
2010-09-23 19:41:42 +00:00
Sean Kelly
43bc41ca7a Added core.atomic to import list. 2010-08-28 21:18:25 +00:00
Walter Bright
b8ce58ccd1 detab sources 2010-08-23 02:14:45 +00:00