Re: m_condition.mutex cannot be used in shared method ?

2014-10-21 Thread via Digitalmars-d-learn
On Monday, 20 October 2014 at 17:37:22 UTC, Sean Kelly wrote: With all the recent work on the GC, we really really need to start tracking which thread owns a given non-shared object so it can be finalized properly. This may mean having the process of casting away shared make the executing

Re: m_condition.mutex cannot be used in shared method ?

2014-10-20 Thread Marco Leise via Digitalmars-d-learn
Am Sun, 19 Oct 2014 17:09:22 + schrieb Sean Kelly s...@invisibleduck.org: What really needs to happen is for everything in core.sync to be made shared. I got partway through this at one point and stopped, because it was imposing a terrible design on the classes--I had shared methods

Re: m_condition.mutex cannot be used in shared method ?

2014-10-20 Thread Sean Kelly via Digitalmars-d-learn
On Monday, 20 October 2014 at 09:53:23 UTC, Marco Leise wrote: Thank you for that honest response. The situation is really bizarre. I just tried to create a shared worker thread and there is no ctor in Thread that creates a shared instance. Is a shared constructor even meaningful? [1] If we

m_condition.mutex cannot be used in shared method ?

2014-10-19 Thread Marco Leise via Digitalmars-d-learn
I have a thread that is shared by others, so I have a shared method, inside of which I wrote: final void opOpAssign(string op : ~)(ref StreamingObject item) shared { synchronized (m_condition.mutex) { m_list.unshared ~= item; m_condition.notify();

Re: m_condition.mutex cannot be used in shared method ?

2014-10-19 Thread Sean Kelly via Digitalmars-d-learn
On Sunday, 19 October 2014 at 13:42:05 UTC, Marco Leise wrote: I have a thread that is shared by others, so I have a shared method, inside of which I wrote: final void opOpAssign(string op : ~)(ref StreamingObject item) shared { synchronized (m_condition.mutex) {