[e-lang] Lamport slots with PBC (please ignore duplicate msg if exists)

Martin_Scheffler martinscheffler at googlemail.com
Mon Feb 5 07:39:33 CST 2007




Mark S. Miller wrote:
> 
> What does "npbc" stand for?
> 
Not pass by copy. The newly created slot needs to have a ref to the original
slot. The lamportReporter is pbc, so it would be copied if I did not wrap it
with a not-pbc object.


Mark S. Miller wrote:
> 
> How did you work around the fact that I still haven't fixed:
> https://sourceforge.net/tracker/index.php?func=detail&aid=1635331&group_id=75274&atid=551529
> 
With a quick and dirty hack.

----------8<----------- GlobalImporterHack.java ------------8<---------
package de.flowdev.emonkey;

import java.io.Serializable;
import org.erights.e.elib.serial.BaseLoader;
import org.erights.e.elib.serial.JOSSPassByConstruction;

public class GlobalImporterHack  implements Serializable,
JOSSPassByConstruction  {
	private static final long serialVersionUID = 232062343535L;
	public static BaseLoader importer;
	
	public GlobalImporterHack() {
		//nothing		
	}
	
	public BaseLoader getImporter() {
		return importer;
	}
	
	public void setImporter(BaseLoader i) {
		importer=i;
	}
	
	public Object get(String name) {
		return importer.get(name);		
	}
} 

------------------------8<---------------------- 
At the beginning of my scripts:
def importer:=<import:de.flowdev.emonkey.makeGlobalImporterHack>()
importer.setImporter(<import>)

Then in the optUncaller:
to __optUncall() :any {
    def importer:=<import:de.flowdev.emonkey.makeGlobalImporterHack>()
    return [importer, "get", ["de.flowdev.emonkey.makeTestEPBC"]]
}

This is ugly but now I can play around with it.

When I pass PBC objects between VATs, the __optUncall function is executed
twice or more, and on the other side the constructor is called twice or
more, too.
This only happens when I set up inter-vat connection over a sturdy ref. When
I spawn a vat with seedVatAuthor, everything seems to work as expected.
Is this a bug? I have a test case if this is interesting.

BTW, should I post bug reports here or on slashdot?

-- 
View this message in context: http://www.nabble.com/Lamport-slots-with-PBC-tf3157110.html#a8806303
Sent from the E Lang mailing list archive at Nabble.com.



More information about the e-lang mailing list