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 main(string[] args)
{
}
I get a compile error onlineapp.d(8): Error: template
std.container.dlist.DList!string.DList.insertFront cannot deduce
function from argument types !()(string) shared, candidates are:
/dlang/dmd/linux/bin64/../../src/phobos/std/container/dlist.d(441):
std.container.dlist.DList!string.DList.insertFront(Stuff)(Stuff stuff)
https://run.dlang.io/gist/3afff560fe3b2f439272c3ee3adcebd0?compiler=dmd