No need.
Message has additional arguments.
Btw, thanks for help! I found a solution.
struct Message
{
uint id;
string command;
Variant[] args;
this(T...)(uint id, string command, T args)
{
this.id = id;
this.command = command;
this.args = variantArray
You can also create new types:
struct UseSprite { string s;}
struct UseAnimation { string s;}
>> It's not a class instance, it's a class type. Something like
>> `cast(Sprite) null` in parameters. It can be replaced by string
>> "Sprite", but in this case I can't use receive() as it is. E.g.
>>
>
On 8/09/2014 12:39 a.m., MarisaLovesUsAll wrote:
Thanks for reply.
Strings are immutable so thats ok. A class instance that isn't
immutable isn't.
It's not a class instance, it's a class type. Something like
`cast(Sprite) null` in parameters. It can be replaced by string
"Sprite", but in this
Thanks for reply.
Strings are immutable so thats ok. A class instance that isn't
immutable isn't.
It's not a class instance, it's a class type. Something like
`cast(Sprite) null` in parameters. It can be replaced by string
"Sprite", but in this case I can't use receive() as it is. E.g.
send
On Sunday, 7 September 2014 at 10:42:37 UTC, MarisaLovesUsAll
wrote:
Hi!
I'm trying to make my program multithreaded, and I was stuck at
messaging between threads.
I need to pack types and variables into one message. Will I use
Tuples or something?
e.g.
class Sprite {};
send(tid, Sprite, "c
On 7/09/2014 10:42 p.m., MarisaLovesUsAll wrote:
Hi!
I'm trying to make my program multithreaded, and I was stuck at
messaging between threads.
I need to pack types and variables into one message. Will I use Tuples
or something?
e.g.
class Sprite {};
send(tid, Sprite, "create", myInt);
Don't
Hi!
I'm trying to make my program multithreaded, and I was stuck at
messaging between threads.
I need to pack types and variables into one message. Will I use
Tuples or something?
e.g.
class Sprite {};
send(tid, Sprite, "create", myInt);
Also I don't understand how to use