Re: Example usage of the core.sync classes

2015-01-03 Thread Vlad Levenfeld via Digitalmars-d-learn
On Sunday, 4 January 2015 at 01:02:07 UTC, Matt wrote: What I mean is that I don't understand what atomicStore, atomicLoad, etc. actually DO, although in the case of the two mentioned, I can hazard a pretty good guess. The documentation doesn't exist to tell me how to use the functions found in

Re: Example usage of the core.sync classes

2015-01-03 Thread Matt via Digitalmars-d-learn
On Saturday, 3 January 2015 at 22:10:49 UTC, Vlad Levenfeld wrote: On Saturday, 3 January 2015 at 15:44:16 UTC, Matt wrote: Right, I've been looking at core.atomic, but it has very little documentation, and it's territory I haven't explored, yet. Any chance of some pointers along the way? Cou

Re: Example usage of the core.sync classes

2015-01-03 Thread Vlad Levenfeld via Digitalmars-d-learn
On Saturday, 3 January 2015 at 15:44:16 UTC, Matt wrote: Right, I've been looking at core.atomic, but it has very little documentation, and it's territory I haven't explored, yet. Any chance of some pointers along the way? Could you be more specific about what you need help understanding? You

Re: Example usage of the core.sync classes

2015-01-03 Thread Matt via Digitalmars-d-learn
On Friday, 2 January 2015 at 18:52:11 UTC, Benjamin Thaut wrote: Am 02.01.2015 um 19:45 schrieb Vlad Levenfeld: My personal favorite method is to use the primitives in core.atomic with a double or triple buffer. To double buffer, keep two buffers in an array (data[][] or something) and an int

Re: Example usage of the core.sync classes

2015-01-02 Thread Benjamin Thaut via Digitalmars-d-learn
Am 02.01.2015 um 19:45 schrieb Vlad Levenfeld: My personal favorite method is to use the primitives in core.atomic with a double or triple buffer. To double buffer, keep two buffers in an array (data[][] or something) and an integer index that points to the active buffer, then use atomicStore to

Re: Example usage of the core.sync classes

2015-01-02 Thread Vlad Levenfeld via Digitalmars-d-learn
On Friday, 2 January 2015 at 17:39:19 UTC, Matt wrote: I'm trying to write a small 3D engine, and wanted to place the physics in a separate thread to the graphics, using events, possibly std.concurrency, to communicate between them. How, then, do I pass large amounts of data between threads? I

Example usage of the core.sync classes

2015-01-02 Thread Matt via Digitalmars-d-learn
I'm trying to write a small 3D engine, and wanted to place the physics in a separate thread to the graphics, using events, possibly std.concurrency, to communicate between them. How, then, do I pass large amounts of data between threads? I'm thinking the physics world state (matrix for each ob