On Thu, Mar 31, 2011 at 7:59 PM, Jason House
wrote:
> Jose Armando Garcia Wrote:
>
>> On Wed, Mar 30, 2011 at 9:39 PM, Jason House
>> wrote:
>> > Jose Armando Garcia Wrote:
>> >
>> >> How do I get around this error?
>> >
>> > That's not easy to answer... To get the compiler to shut up, you can c
Jose Armando Garcia Wrote:
> On Wed, Mar 30, 2011 at 9:39 PM, Jason House
> wrote:
> > Jose Armando Garcia Wrote:
> >
> >> How do I get around this error?
> >
> > That's not easy to answer... To get the compiler to shut up, you can copy
> > and paste FILE's destructor and mark it as shared. Of
On Wed, Mar 30, 2011 at 9:39 PM, Jason House
wrote:
> Jose Armando Garcia Wrote:
>
>> Why am I getting this error? I suspect that synchronized is the
>> problem.
>
> A synchronized class is implicitly shared and most of the methods are
> synchronized. I say most because at a minimum, the constru
Adding a shared dtor to File doesn't sound like the correct solution.
On Wed, Mar 30, 2011 at 8:14 PM, KennyTM~ wrote:
> On Mar 31, 11 06:34, Jason House wrote:
>>
>> he compiler wants "argument types () shared" instead of "argument types
>> ()". It's an awful error message, and I'm certain I fil
First of all, thanks for the reply.
That means that it is imposible to use a struct or class that
overrides ~this() inside of a synchronized class. As long as I take
the extra care of making sure that I don't expose an object of this
class/struct outside of the synchronized class. It is impossible
TLS takes some time to getting used to. Doing multithreading in a way
forces me to stop using globals, because I always get bitten when
spawning new threads and only later realizing that my globals have
been re-initialized to their .init value. The new thread ends up
reading mostly zero-initialized
Jose Armando Garcia Wrote:
> Why am I getting this error? I suspect that synchronized is the
> problem.
A synchronized class is implicitly shared and most of the methods are
synchronized. I say most because at a minimum, the constructor isn't
synchronized on anything. As you probably know sh
KennyTM~ Wrote:
> On Mar 31, 11 06:34, Jason House wrote:
> > he compiler wants "argument types () shared" instead of "argument types
> > ()". It's an awful error message, and I'm certain I filed a bug for it at
> > least a year ago. In the toy example, mark the destructor as shared, and it
> >
On Mar 31, 11 06:34, Jason House wrote:
he compiler wants "argument types () shared" instead of "argument types ()".
It's an awful error message, and I'm certain I filed a bug for it at least a year ago. In the toy
example, mark the destructor as shared, and it should compile.
Yes you have. h
he compiler wants "argument types () shared" instead of "argument types ()".
It's an awful error message, and I'm certain I filed a bug for it at least a
year ago. In the toy example, mark the destructor as shared, and it should
compile.
Jose Armando Garcia Wrote:
> It looks like the following
import std.stdio;
class B
{
private File file;
}
synchronized class A
{
private File file;
}
void main()
{
}
/usr/include/d/dmd/phobos/std/stdio.d(292): Error: destructor
std.stdio.File.~this () is not callable using argument types ()
Why am I getting this error? I suspect that synchronized
It looks like the following works:
struct B {}
synchronized class A { private B b }
but this doesn't:
struct B { ~this() {} }
synchronized class A { private B b }
On Wed, Mar 30, 2011 at 4:59 PM, Jose Armando Garcia wrote:
> import std.stdio;
>
> class B
> {
> private File file;
> }
> synchro
12 matches
Mail list logo