Strange multithreading error

Ruby The Roobster michaeleverestc79 at
Sat Oct 30 00:26:13 UTC 2021

On Friday, 29 October 2021 at 23:32:38 UTC, Steven Schveighoffer 
> On Friday, 29 October 2021 at 22:02:53 UTC, Ruby The Roobster 
> wrote:
>> I am currently writing a test program for a collision 
>> function, that involves multithreading so I can simultaneously 
>> check for collisions and move a skeleton at the same time.  
>> Because of this, I had to use ```shared``` objects.  The 
>> specific objects I was using were declared in a file called 
>> "skeleton.d."  In a function I wrote for moving the skeletons, 
>> it uses operator overloading, which produces the following 
>> output:
>> [...]
> In order for a member function to be called on a shared object, 
> the function has to be marked shared. Typically done like
> ```d
> void opAssign(shared Skeleton rhs) shared
> ```
> -Steve

Thank you, this solved my problem.

More information about the Digitalmars-d-learn mailing list