use of jcog.event.Ons in project narchy by automenta.
the class AutoSurface method start.
@Override
public void start(@Nullable SurfaceBase parent) {
synchronized (this) {
seen.clear();
ons = new Ons();
List<Surface> l = new FasterList();
collect(obj, l, 0);
super.start(parent);
set(l);
}
}
use of jcog.event.Ons in project narchy by automenta.
the class NARService method start.
@Override
protected final void start(NAR nar) {
synchronized (this) {
logger.debug("start {}", id);
this.nar = nar;
ons = new Ons(nar.eventClear.on(n -> clear()));
starting(nar);
}
}
use of jcog.event.Ons in project narchy by automenta.
the class DynamicConceptSpace method start.
@Override
public void start(SpaceGraphPhys3D<Concept> space) {
synchronized (this) {
super.start(space);
onDur = DurService.on(nar, () -> {
if (!updated.get() && concepts.update()) {
updated.set(true);
}
}).durs(1);
this.onClear = new Ons(nar.eventClear.on(() -> {
synchronized (this) {
next.write().clear();
next.commit();
concepts.clear();
}
}));
}
}
Aggregations