[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Thu, 25 Mar 2004 13:27:31 +0000 (UTC) 
Subject:Re: threads and shared memory space in pop11 
From:ug57dsm 
Volume-ID: 

Aaron Sloman wrote:
> Dave
> 
> 
>>I'm (still) trying to get a threaded program working under pop11, so far
>>I have managed to get the threads working and it all seemed to be fine,
>>until I ran into the issue of shared memory with lists.
> 
> 
> If you really want to share memory the simplest thing is to use
> 'lightweight' processes, created using consproc, etc.
> 
> You'll then need to write your own scheduler, as explained previously.
> 

OK, thanks, I'll find my way around this... :)

> [snip]
>>global vars list = [a b];
>>
>>define some();
>>     if sys_vfork(false) then
>>         "some" -> list(1);
>>     endif;
>>enddefine;
> 
> 
> The documentation on sys_vfork (in REF sysutil) says:
> [snip]

my bad... In the example I didn't use vsys_fork until much later, but I
must have forgotten to change it to sys_fork when I cut and pasted from
the file.

Is there some kind of flag I can give during variable generation so that
the system will know I only want one copy on memory regardless of the
ammount of forks? something like "global unique vars my_var = [...];" if
not that would probably be a good thing to add for people working with
multiple threads/processes in pop11 :).. just a thought.

David.

-- 
=================================================
  The future of HTML mail is clearly > /dev/null.
=================================================