Re: op=

2010-01-21 Thread Rainer Deyke
Ellery Newcomer wrote: > according to the spec, > > a op= b; > > is semantically equivalent to > > a = a op b; > > but this doesn't seem to be strictly true. It's untrue in several ways. For example: SomeReferenceType a, b; a = a + b; // Creates new object. b += c; // Modifies an object in

op=

2010-01-21 Thread Ellery Newcomer
according to the spec, a op= b; is semantically equivalent to a = a op b; but this doesn't seem to be strictly true. for example: char c = 'a'; real r = 3.14; c = c + r; // error c += r; // accepted; seems to be doing c += floor(r); is this behavior intentional?

Re: Synchronized Linked List Traversal

2010-01-21 Thread Steven Schveighoffer
On Thu, 21 Jan 2010 13:44:53 -0500, Jonathan Crapuchettes wrote: Yeah, but I have a lot of code in this project that uses phobos and it would be a major pain (not to mention the time) to switch over. Thank you for the thought, Jonathan No problem. You also might consider tangobos, but I

Re: Synchronized Linked List Traversal

2010-01-21 Thread Jonathan Crapuchettes
Yeah, but I have a lot of code in this project that uses phobos and it would be a major pain (not to mention the time) to switch over. Thank you for the thought, Jonathan Steven Schveighoffer wrote: On Thu, 21 Jan 2010 13:29:37 -0500, Jonathan Crapuchettes wrote: Thank you for the help. Sin

Re: Synchronized Linked List Traversal

2010-01-21 Thread Steven Schveighoffer
On Thu, 21 Jan 2010 13:29:37 -0500, Jonathan Crapuchettes wrote: Thank you for the help. Since I am using D1, I think I will use the pthread mutexes through the C API. Tango provides mutex objects for D1. -Steve

Re: Synchronized Linked List Traversal

2010-01-21 Thread Jonathan Crapuchettes
Thank you for the help. Since I am using D1, I think I will use the pthread mutexes through the C API. Steven Schveighoffer wrote: On Thu, 21 Jan 2010 08:35:50 -0500, Steven Schveighoffer wrote: To do this, you need a manual mutex, look in tango.core.sync.Mutex I think. or core.sync.mutex

Re: Synchronized Linked List Traversal

2010-01-21 Thread Steven Schveighoffer
On Thu, 21 Jan 2010 08:35:50 -0500, Steven Schveighoffer wrote: To do this, you need a manual mutex, look in tango.core.sync.Mutex I think. or core.sync.mutex for D2... -Steve

Re: Synchronized Linked List Traversal

2010-01-21 Thread Steven Schveighoffer
On Wed, 20 Jan 2010 19:25:27 -0500, Jonathan Crapuchettes wrote: I'm working on a project that requires multi-threading and I am trying to grasp the best way to work with setting up a linked-list where multiple threads might try to be setting the next element in the list at the same time