Thanks Filip. I am using it for kind of Logging purposes. But the port
is keeping up the logs (it's not really log for my case) from the last
run if I did not restart server. I want it to refresh the log (more like
some diagnostic info in my case) at every run even I do not restart the
server. Is there a simple way to clear the port?

Ashis

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Filip Konvicka
Sent: Wednesday, March 11, 2009 3:29 PM
To: [email protected]
Subject: Re: Global variable (Dictionary)

Hi,

> I am getting another hang-up here. It appears that Port is not getting
> cleaned up in subsequent runs if the underlying process does not die.
Is
> there a simple way to reset the Port/Stream?

I am accessing ports from spaces without problems. Remeber, when using 
this from scripts, the semantics must not break the rules of spaces - 
identical queries should always return identical results. (I used this 
for referencing external static data and for caching of const 
calculations.) Other meaningful usages are console I/O (output) and
logging.

What exact problems are you experiencing? Isn't it that the server 
thread just died? Be sure to fortify the thread using try...catch for 
each message.

HTH,
Filip


> Thanks so much,
> 
> Ashis
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Maity, Ashis K
> Sent: Friday, February 27, 2009 3:50 PM
> To: Mozart users
> Subject: RE: Global variable (Dictionary)
> 
> Thanks so much. I was able to solve my problem using Port.
> 
> Ashis
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Torsten Anders
> Sent: Friday, February 27, 2009 1:11 PM
> To: Mozart users
> Subject: Re: Global variable (Dictionary)
> 
> On Feb 27, 2009, at 4:29 PM, Raphael Collet wrote:
>> The error message says that you are trying to modify a stateful  
>> entity from inside a computation space.  This is forbidden by the  
>> language definition, because it breaks an essential assumption on  
>> computations spaces: they cannot have side effects.  There is an  
>> exception to the rule, however: you can send messages on ports.
> 
> Besides, you could put a dictionary inside the script so it becomes  
> local.
> 
> Best
> Torsten
> 
>>
>> Cheers,
>> raph
>>
>> On Fri, Feb 27, 2009 at 4:59 PM, Maity, Ashis K  
>> <[email protected]> wrote:
>> Hi everybody,
>>
>> How can I store data in a global variable (say in a Dictionary) in a
>> functor file so that I can export that data that can be accessed from
>> another functor? Specifically, I am trying something like this (seems
>> like this sandbox code doesn't even compile -- though actual code  
>> does):
>>
>> functor
>> import
>> export
>> define
>>  Dict
>>
>>  Dict = {Dictionary.new}
>>
>>  proc{StoreInfo}
>>     {Dictionary.put Dict xx yy}
>>  end
>> end
>>
>>
>> The program either hangs or I get error -- "assignment of global
>> variable from local space" (it appears that I can do Dictionary.get
>> operation from local space). If I can not do it this way is there
>> another way I can store several key-value pairs that can be  
>> accessed at
>> the end of run from another(Client) Functor?
>>
>> Thanks so much.
>>
>> Ashis
>>
______________________________________________________________________
> 
>> ___________
>> mozart-users mailing list                               mozart- 
>> [email protected]
>> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>>
>> <ATT00001.txt>
> 
>
________________________________________________________________________
> _________
> 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
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to