Walter Bright
b8ce58ccd1
detab sources
2010-08-23 02:14:45 +00:00
Sean Kelly
3b1f4d0010
Added unit tests to verify static checking of occlusion.
2010-08-22 11:52:04 +00:00
Sean Kelly
b78bc4c59d
Bug report from Hans Fugal. The callback occlusion detection was borked for receive() and receiveTimeout(). It was failing if the final parameter was a Variant both because of an off-by-1 error and because the test should have been in a "static if" instead of just an "if" block. Unit tests forthcoming.
2010-08-22 11:37:50 +00:00
Andrei Alexandrescu
f6077da911
Commented out failing unittests on OSX. Sean, please verify, thanks.
2010-07-28 07:56:29 +00:00
Sean Kelly
69b0921f4e
Added static checking to ensure that receive() isn't passed two functions with the same argument list, and if a function accepting Variant is present, that it's the last function in the receive set.
2010-07-20 19:18:59 +00:00
Andrei Alexandrescu
432e3fdfc8
Replaced std.contracts with std.exception throughout
2010-07-04 22:09:03 +00:00
Sean Kelly
a3418211b7
Made Tid exempt from hasLocalAliasing tests until shared can properly be applied to the mbox field inside Tid. The actual implementation is safe as-is so adding the shared label is mostly to conform to the D2 way of doing things.
2010-07-02 19:14:22 +00:00
Sean Kelly
947b1cdc7c
Fixed receiveTimeout.
2010-06-30 18:32:04 +00:00
Sean Kelly
99d6af1e86
Issue 4406 - Typo (bug) in std.concurrency
...
Fixed.
2010-06-29 21:24:38 +00:00
Sean Kelly
d144aa0061
Added static checking to forbid spawn or send params containing aliases to mutable thread-local data (ie. immutable and shared are both allowed).
2010-06-23 04:52:47 +00:00
Lars T. Kyllingstad
d2ee581d50
Fix "statement is not reachable" warnings in std.concurrency.
2010-06-22 17:02:59 +00:00
Sean Kelly
ebf24cc632
This should fix the issues with sending and receiving Tuples.
2010-06-20 04:48:43 +00:00
Sean Kelly
7bd396b135
Fixed compile error for unittest. The concurrency unittest still hangs when sending an explicit tuple though, because it isn't matching correctly. Fixing that now.
2010-06-19 18:17:20 +00:00
Sean Kelly
3f20e149fc
Added a default ctor for Tuple (needed to put a Tuple in a Variant).
...
Fixed an issue with the Tuple copy ctor. It now compiles.
Added prioritySend per TDPL. Needs more testing, but it looks good so far.
2010-06-19 06:46:39 +00:00
Sean Kelly
b5fc866431
Implemented setMaxMailboxSize(). Also added docs for some functions. The receive() method is still more complicated than I'd like, mostly because of the special handling of the OwnerTerminated message.
2010-06-18 07:20:55 +00:00
Sean Kelly
534e5497e6
Changed spawnLinked so the owner relationship is preserved. The thread link takes precedence when one of the linked threads terminates, but if the link is broken (via the not yet implemented unlink() routine) then an OwnerTerminated exception will still be thrown when the owner terminates.
2010-06-16 18:48:01 +00:00
Sean Kelly
2206b4233c
Fixed compile error in spawnLinked.
2010-06-15 22:03:40 +00:00
Sean Kelly
a980bb4ec2
Added spawnLinked as an experimental feature to test bidirectional linking. A spawnLinked thread won't have an owner, but if either it or the calling process terminates a LinkTerminated exception will be thrown from receive() when called by the other. Another difference is that this exception will be thrown once message list processing has passed through enough of the queue to encounter it rather than when no valid matches were found in the queue and the caller would have to block. I'd like to change the OwnerTerminated mechanism to work the same way (ie. throw when the message is encountered rather than continue scanning the queue looking for valid messages) but this warrants further discussion.
2010-06-15 21:30:06 +00:00
Walter Bright
cd0512c962
Sean's update
2010-06-12 20:57:44 +00:00
Sean Kelly
eb019b9df3
Added owner/owned thread behavior. One bug remains where messages from an owned to an owner thread about owned thread termination aren't remoevd from the queue. Annoying, but just a leak and I'm out of time.
2010-06-12 13:13:08 +00:00
Andrei Alexandrescu
f8f1fdbd37
Eliminated spurious unittest stdout messages.
2010-06-08 17:17:20 +00:00
Sean Kelly
8ceb365740
Fixed a stupid mistake in receiveOnly.
2010-06-05 01:23:08 +00:00
Sean Kelly
d18cea855b
Fixed an issue with tid.send(). Also added ostensibly correct code for receiveOnly in a version(none) block because there appears to be a compiler bug that prevents it from working.
2010-06-04 22:49:45 +00:00
Don Clugston
f5cf7d68f4
Trivial typo in comment
2010-05-31 11:28:04 +00:00
Walter Bright
0cbbd427f2
shouldn't have a main()
2010-03-10 01:57:00 +00:00
Sean Kelly
274b66899c
Added receiveOnly, receiveTimeout, and Tid.send. Still lacking static param checking, setMaxMailboxSize, and possibly some other stuff. Documentation is needed as well.
2010-03-09 19:40:29 +00:00
Sean Kelly
c716f738aa
Added std.concurrency. The cuurrent implementation is still pretty spare, but the basics work. See the unittest for an example.
...
"make unittest" doesn't work with this module because the compiler breaks on what it thinks is unreachable code. I suppose "treat warnings as errors" will have to be turned off for this module unless someone can find a way to convince the compiler that this code is correct.
More additions forthcoming. I just wanted to get this in now so it didn't have to continue being passed around via email.
2010-03-09 06:32:39 +00:00