Re: How to use containers in lock based concurrency

2017-11-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, November 03, 2017 21:23:02 Nathan S. via Digitalmars-d-learn wrote: > Is this advice from 2015 outdated? I found it while I was > wrestling with shared data structures, and after reading I > stopped doing that. > > https://p0nce.github.io/d-idioms/#The-truth-about-shared > > >The truth

Re: How to use containers in lock based concurrency

2017-11-03 Thread Nathan S. via Digitalmars-d-learn
Is this advice from 2015 outdated? I found it while I was wrestling with shared data structures, and after reading I stopped doing that. https://p0nce.github.io/d-idioms/#The-truth-about-shared The truth about shared It's unclear when and how shared will be implemented. Virtually noone use sh

Re: How to use containers in lock based concurrency

2017-11-03 Thread crimaniak via Digitalmars-d-learn
On Friday, 3 November 2017 at 12:42:29 UTC, ANtlord wrote: Hello! I can't get how to use double linked list in concurrency. Please help. ... I get a compile error onlineapp.d(8): Error: template std.container.dlist.DList!string.DList.insertFront cannot deduce function from argument types !()(s

How to use containers in lock based concurrency

2017-11-03 Thread ANtlord via Digitalmars-d-learn
Hello! I can't get how to use double linked list in concurrency. Please help. Providing code import std.stdio; import std.container; synchronized class SocksQueue { private shared(DList!string) _queue; public void f(string data) { this._queue.insertFront(data); } } void