Hello,

I don't think this is related to threads. While threads themselves
cannot be distributed, objects that merely use threads should not
cause problems when distributed.
I wonder whether the warning might be related to the
CreateRemoteStationaryObject procedure that I proposed earlier. In
this procedure, a "failed value" is created when a problem occurs.
Maybe distribution of failed values can cause problems in Mozart 1.3.2
You could try to replace this line:

{Value.failed E}

with

error(E)

and see whether the warning goes away.
This is just a wild guess, though. Not sure whether there is any relation.

Cheers,
  Wolfgang

On Thu, Sep 9, 2010 at 4:01 PM, Khadija EL MAHRSI
<[email protected]> wrote:
> Hello,
> could this warning be caused by the use of threads? I read in the
> documentation that due to limitations of the current release threads are
> sited even though they are in base modules and I was wondering how can I get
> around this limitation (Correct me if I'm wrong but I did some research and
> it doesn't seem that this has changed with Mozart 1.4).
>
> This is the main idea, in my application I have 2 classes (class1 and
> class2) and one of them (class1) uses a thread in its init method. In my
> main.oz I create an instance of both classes. Class2's instance is
> stationary and runs on a remote site and I want to pass the class1's
> instance to class2's init method as parameter so that it can be affected as
> one of class2's attributes or features. Maybe this is where it goes wrong?
> Sigh, everything sure is different and more difficult when trying to do
> distributed applications (centralized applications are rather easier to
> achieve) especially for someone who isn't an expert such as myself :-(
>
> Forgive my constant questions but I'm still trying to get the hang of this
> language (which is still very new to me) and there is no one else to ask
> since unlike other programming languages I had used, this mailing list is
> the only solution when facing a problem whose solution is not easy to find
> on one's own so I humbly ask for your help.
>
> Thanks.
>
> 2010/9/5 Boriss Mejias <[email protected]>
>>
>> Hi Khadija,
>>
>> The warning "marshaling a variable as a resource" is related to your
>> previous question about sending {OS.rand} to a remote site, and execute it
>> over there. OS, as well as System and other modules, cannot be exported to a
>> remote site because they are considered resources of the machine. So, when
>> you try to distribute a piece of code such as {OS.rand}, it just marshals it
>> as a resource, and cannot be used remotely.
>>
>> I hope it helps
>> cheers
>> Boriss
>>
>>
>>
>> On 04/09/10 18:59, Khadija EL MAHRSI wrote:
>>>
>>> Hello,
>>> I was wondering if anyone had any idea about the following execution
>>> warning and can explain it to me:
>>> Warning: marshaling a variable as a resource!
>>> Thanks.
>>>
>>>
>>>
>>>
>>> _________________________________________________________________________________
>>> mozart-users mailing list
>>> [email protected]
>>> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>>
>>
>> _________________________________________________________________________________
>> mozart-users mailing list
>> [email protected]
>> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to