Commit graph

141 commits

Author SHA1 Message Date
Sönke Ludwig
09b69b2fdf Add unit test for Tid.toString. 2016-02-09 12:58:21 +01:00
Sönke Ludwig
d6908237c9 Fix Tid.toString().
The previous behavior generated a string that was different for every copy of the same Tid. With this change it outputs the address of the unique MessageBox instance instead.
2016-02-09 12:43:35 +01:00
Shriramana Sharma
5978ca7831 migrate other Phobos modules to use std.exception.basicExceptionCtors 2016-01-17 10:39:37 +05:30
tcak
38bd1b898f Parentheses and redundant spaces are removed. 2016-01-02 15:39:16 +02:00
tcak
c2c682aea8 An extra example is added for spawn function. 2015-12-30 20:06:10 +02:00
Jonathan M Davis
26a4340c30 Remove stray uses of TickDuration from Phobos internals. 2015-12-03 03:01:03 -08:00
Jonathan M Davis
d34164a2ea Move some deprecations along. 2015-11-26 00:28:38 -08:00
Brian Schott
67c95e6de2 Merge pull request #3715 from dcarp/AliasSeq
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
Vladimir Panteleev
82590904f7 fix Issue 15208 - Eradicate all uses of "Enforcement failed" in Phobos 2015-10-15 23:44:44 +00:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Doado
3772768224 Corrected typo on line 1196 from "varialbe" to "variable". PS Is the use of "analog" correct here? It sounds a bit odd. 2015-09-01 14:04:54 +01:00
sigod
c8048fa488 std.concurrency: receiveTimeout: document behavior with negative timeout 2015-07-25 12:10:53 +03:00
Walter Bright
8f4c07a840 add std.concurrencybase 2015-07-05 00:50:38 -07:00
Dmitry Olshansky
bcedffd0ee Merge pull request #2943 from MartinNowak/useInitOnce
use initOnce for lazy shared initialization
2015-06-26 20:51:14 +03:00
Robert burner Schadek
62662c76cc fixes c style string concat 2015-05-28 18:27:12 +02:00
Walter Bright
d9a9826e55 Revert "Introducing std.meta package" 2015-05-06 14:36:45 -07:00
Dicebot
a76d90c927 Phobos should only mention tuple as std.typecons.Tuple 2015-05-05 22:22:11 +03:00
Dicebot
82f54a38d3 TypeTuple -> MetaList inside Phobos 2015-05-05 22:22:11 +03:00
Dicebot
73f773838d import std.typetuple -> import std.meta 2015-05-05 22:22:10 +03:00
Martin Nowak
e7dcf0c20f replace shared static this with cas based lazy initialization
- to avoid circular module dependencies
2015-04-20 16:36:40 +02:00
Robert Schadek
f22559ffc1 Merge pull request #3041 from MartinNowak/synchronizeAttributes
fix attributes for synchronized (mtx)
2015-03-10 15:04:05 +01:00
Martin Nowak
196b7bd734 roll back Mutex nothrow
- we had troubles turning vibe.d's mutex class
  into nothrow and have to undo the changes
  for now

- use internal lock_nothrow/unlock_nothrow
  functions so that the Scheduler API need
  not be changed
2015-03-06 21:49:12 +01:00
Martin Nowak
0915442a55 can't synchronize on a const mutex
- deprecate MessageBox.isClosed
2015-03-06 21:41:39 +01:00
Martin Nowak
10cbf750f5 use initOnce for lazy shared initialization
- use TickDuration.currSystemTick instead of Clock.currSystemTick
  to break cyclic dependency of std.datetime and std.concurrency
2015-02-11 20:31:37 +01:00
Andrei Alexandrescu
d2112760e1 Avoid use after remove from hashtable 2015-01-31 19:33:16 -08:00
Robert burner Schadek
d250e5cc26 Revert "Remove concurrency @trusted workarounds"
This reverts commit 299f0183e2661cb2640749a692a3463a0e51c1f9.

thread local forward

thread local default log function forward

nicer imports

forwardMsg must not be final

moved comments to package and started to integerade Martin's log disabling

more compile time function disabling

style and dscanner suggestions

stdThreadLog fix and doc

a lot of updates

* spell fixes
* better tests
* docu changes

docu update

whitespace

moduleLogLevel docu
2015-01-26 16:09:48 +01:00
Dicebot
8a77147276 Relax safety requirements on logging methods
Allows logging objects with @system toString
To compensate the change unittest blocks where marked as @safe where
applicable

Remove concurrency @trusted workarounds

Relevant druntime PR has been merged, plain @safe works now
2015-01-25 21:31:24 +01:00
Robert burner Schadek
bb1929b7b5 some more on multilogger
doc and style fixes mostly

rebase
2015-01-25 21:31:24 +01:00
Dicebot
e47421c878 Make std.concurrency constructors @safe
Fix safety of logger.core

Replaces @trusted abuse with @safe annotations and few occasional
@trusted tweaks.

Improve safety of all logger

Cleans usage of @safe and @trusted in derived modules
2015-01-25 21:31:24 +01:00
Andrei Alexandrescu
224ab42e0c Merge pull request #2874 from MartinNowak/addMessageFreeList
use lock-free freelist
2015-01-24 12:00:19 -08:00
H. S. Teoh
fb7d68882e Merge pull request #2872 from MartinNowak/test2644
regression test for FiberCondition fix (pull #2644)
2015-01-20 19:44:18 -08:00
Martin Nowak
dcee2cd9e4 Merge pull request #2664 from MartinNowak/master
add initOnce
2015-01-20 10:28:09 +01:00
Martin Nowak
92f14d8dd5 destroy node value before putting it on the freelist
- to free any owned GC memory
2015-01-16 04:02:34 +01:00
Martin Nowak
c91cbef509 replace mutex with spinlock to reduce overhead
- spinlock yields on contention
2015-01-16 03:49:25 +01:00
David Nadlinger
9c26b67f4f Merge pull request #2873 from MartinNowak/schedulerNothrow
mark rest of std.concurrency Scheduler as nothrow
2015-01-15 18:12:17 +01:00
Martin Nowak
78ab1a5ebd Merge pull request #2645 from complexmath/addMessageFreeList
Add message free list to std.concurrency
2015-01-15 09:50:09 +01:00
Martin Nowak
0a33966a30 mark rest of std.concurrency Scheduler as nothrow
- works now that core.sync.* is completely nothrow too
2015-01-15 09:47:54 +01:00
Martin Nowak
74599d3750 regression test for FiberCondition fix (pull #2644) 2015-01-15 09:43:12 +01:00
Martin Nowak
f2e5228d60 Merge pull request #2644 from complexmath/fixFiberScheduler
Fix a bug with FiberScheduler
2015-01-15 09:37:32 +01:00
Martin Nowak
ac84cbeb55 add initOnce
- uses double-checked locking (the correct one)

- minimal overhead and simple API

- default mutex is shared among all instances
2015-01-05 02:46:55 +01:00
Geod24
fc132046bf Remove deprecated and undocumented hasLocalAliasing, hasRawLocalAliasing, hasLocalObjects 2014-12-21 22:14:31 +01:00
Brad Roberts
9388f8bfee disable fiber test on win32 2014-12-05 01:59:13 +00:00
Kevin Lamonte
0781866902 code formatting, use sink
update docs, style, use thread:id scheme

use MessageBox hash, remove running thread

use mbox address

moved import
2014-11-28 11:04:42 -08:00
Martin Nowak
354544b6bb nothrow for Schedulder
- require nothrow for thisInfo, yield

- make Condition methods nothrow
2014-11-23 00:41:57 +01:00
kai
a2d0626b1e Fix deprecation warning in std.concurrency.
Replace false with Fiber.Rethrow.no to remove the warning.
2014-11-22 15:31:38 +01:00
k-hara
b80083f198 fix property enforcement 2014-11-20 22:37:57 +09:00
Sean Kelly
40be882d40 Added freelist for messages 2014-10-27 16:37:57 -07:00
Sean Kelly
a843136b2c FiberScheduler wasn't resetting notified state when Condition.wait completed. 2014-10-27 13:33:12 -07:00
Dicebot
8fbad993ce Add Generator to std.concurrency
Generator is an extension to a Fiber that yields return values of specific type
2014-10-21 11:47:21 -07:00
Sean Kelly
519ce8cef6 Make std.concurrency compatible with fibers
https://d.puremagic.com/issues/show_bug.cgi?id=12090

With this commit fibers can have own message boxes and act similar
to threads in that regard.
2014-10-21 11:47:21 -07:00