On Friday, 9 October 2015 at 04:04:42 UTC, bitwise wrote:
Ah, I see. I thought you meant illegal meant it won't compile.
Wouldn't it be more correct to say that it's undefined
behaviour?
I's probably not as undefined as in C case, i.e. it doesn't break
safety guarantees, only the
On Thursday, 8 October 2015 at 02:31:24 UTC, bitwise wrote:
If you have System.Collections.Generic.List(T) static class
member, there is nothing wrong with using it from multiple
threads like this:
The equivalent of your D example would be
class Foo {
static List numbers = new List();
On Thursday, 8 October 2015 at 10:11:38 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 02:31:24 UTC, bitwise wrote:
If you have System.Collections.Generic.List(T) static class
member, there is nothing wrong with using it from multiple
threads like this:
The equivalent of your D example
On Thursday, 8 October 2015 at 13:44:46 UTC, bitwise wrote:
That still doesn't explain what you mean about it being illegal
in other languages or why you brought up C# in the first place.
Illegal means the resulting program behaves incorrectly,
potentially leading to silent failures and data
On Thursday, 8 October 2015 at 20:42:46 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 13:44:46 UTC, bitwise wrote:
That still doesn't explain what you mean about it being
illegal in other languages or why you brought up C# in the
first place.
Illegal means the resulting program behaves
On Wednesday, 7 October 2015 at 09:09:36 UTC, Kagamin wrote:
On Sunday, 4 October 2015 at 04:24:55 UTC, bitwise wrote:
I use C#(garbage collected) for making apps/games, and while,
_in_theory_, the GC is supposed to protect you from leaks,
memory is not the only thing that can leak. Threads
On Sunday, 4 October 2015 at 04:24:55 UTC, bitwise wrote:
I use C#(garbage collected) for making apps/games, and while,
_in_theory_, the GC is supposed to protect you from leaks,
memory is not the only thing that can leak. Threads need to be
stopped, graphics resources need to be released,
On Monday, 5 October 2015 at 00:23:21 UTC, Jonathan M Davis wrote:
On Sunday, October 04, 2015 14:42:48 bitwise via
Digitalmars-d-learn wrote:
Since D is moving towards a phobos with no GC, what will
happen to things that are classes like Condition and Mutex?
Phobos and druntime will always
On Monday, 5 October 2015 at 17:40:24 UTC, bitwise wrote:
You may be right. I wrote a simple download manager in D using
message passing. It was a little awkward at first, but in
general, the spawn/send/receive API seems very intuitive. It
feels awkward because the data you're working with is
On 10/5/15 1:40 PM, bitwise wrote:
On Monday, 5 October 2015 at 00:23:21 UTC, Jonathan M Davis wrote:
On Sunday, October 04, 2015 14:42:48 bitwise via Digitalmars-d-learn
wrote:
Since D is moving towards a phobos with no GC, what will happen to
things that are classes like Condition and Mutex?
On Monday, 5 October 2015 at 20:18:18 UTC, Laeeth Isharc wrote:
On Monday, 5 October 2015 at 17:40:24 UTC, bitwise wrote:
You may be right. I wrote a simple download manager in D using
message passing. It was a little awkward at first, but in
general, the spawn/send/receive API seems very
On Wednesday, 30 September 2015 at 10:32:01 UTC, Jonathan M Davis
wrote:
On Tuesday, September 29, 2015 22:38:42 Johannes Pfau via
Digitalmars-d-learn wrote:
[...]
What I took from the answers to that SO question was that in
general, it really doesn't matter whether a condition variable
has
On Tuesday, 29 September 2015 at 23:20:31 UTC, Steven
Schveighoffer wrote:
yeah, that could probably be done. One thing to note is that
these classes are from ages ago (probably close to 10 years).
New API suggestions may be allowed.
-Steve
I'm still thinking about my last rant, here...
On Sunday, October 04, 2015 14:42:48 bitwise via Digitalmars-d-learn wrote:
> Since D is moving towards a phobos with no GC, what will happen
> to things that are classes like Condition and Mutex?
Phobos and druntime will always use the GC for some things, and some things
just plain need classes.
On Tuesday, 29 September 2015 at 19:10:58 UTC, Steven
Schveighoffer wrote:
An object that implements the Monitor interface may not
actually be a mutex. For example, a pthread_cond_t requires a
pthread_mutex_t to operate properly.
Right! I feel like I should have caught the fact that
On Friday, 25 September 2015 at 15:19:27 UTC, bitwise wrote:
I know that all global variables are TLS unless explicitly
marked as 'shared', but someone once told me something about
'shared' affecting member variables in that accessing them from
a separate thread would return T.init instead of
On Tuesday, September 29, 2015 22:38:42 Johannes Pfau via Digitalmars-d-learn
wrote:
> Am Tue, 29 Sep 2015 15:10:58 -0400
> schrieb Steven Schveighoffer :
>
> >
> > > 3) Why do I have to pass a "Mutex" to "Condition"? Why can't I just
> > > pass an "Object"?
> >
> > An object
On Tue, 2015-09-29 at 03:05 +, bitwise via Digitalmars-d-learn
wrote:
> On Monday, 28 September 2015 at 11:47:38 UTC, Russel Winder wrote:
> > I hadn't answered as I do not have answers to the questions you
> > ask. My reason: people should not be doing their codes using
> > these low-level
On 9/29/15 4:38 PM, Johannes Pfau wrote:
Am Tue, 29 Sep 2015 15:10:58 -0400
schrieb Steven Schveighoffer :
3) Why do I have to pass a "Mutex" to "Condition"? Why can't I just
pass an "Object"?
An object that implements the Monitor interface may not actually be a
mutex.
Am Tue, 29 Sep 2015 15:10:58 -0400
schrieb Steven Schveighoffer :
>
> > 3) Why do I have to pass a "Mutex" to "Condition"? Why can't I just
> > pass an "Object"?
>
> An object that implements the Monitor interface may not actually be a
> mutex. For example, a
On 9/25/15 11:19 AM, bitwise wrote:
Hey, I've got a few questions if anybody's got a minute.
I'm trying to wrap my head around the threading situation in D. So far,
things seem to be working as expected, but I want to verify my solutions.
1) Are the following two snippets exactly
I hadn't answered as I do not have answers to the questions you ask. My
reason: people should not be doing their codes using these low-level
shared memory techniques. Data parallel things should be using the
std.parallelism module. Dataflow-style things should be using spawn and
channels – akin to
On Monday, 28 September 2015 at 11:47:38 UTC, Russel Winder wrote:
I hadn't answered as I do not have answers to the questions you
ask. My reason: people should not be doing their codes using
these low-level shared memory techniques. Data parallel things
should be using the std.parallelism
Sorry I don't know the answers but these questions are
interesting so BUMP ;)
On Friday, 25 September 2015 at 15:19:27 UTC, bitwise wrote:
1) Are the following two snippets exactly equivalent(not just
in observable behaviour)?
a)
Mutex mut;
mut.lock();
scope(exit) mut.unlock();
b)
Mutex
Hey, I've got a few questions if anybody's got a minute.
I'm trying to wrap my head around the threading situation in D.
So far, things seem to be working as expected, but I want to
verify my solutions.
1) Are the following two snippets exactly equivalent(not just in
observable behaviour)?
Pretty please? :)
26 matches
Mail list logo