rm of
This commit is contained in:
@@ -177,10 +177,10 @@ function disrupt(err)
|
||||
|
||||
if (underlings) {
|
||||
var unders = array(underlings)
|
||||
for (var id of unders) {
|
||||
arrfor(unders, function(id) {
|
||||
log.console(`calling on ${id} to disrupt too`)
|
||||
$_.stop(create_actor({id}))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (err) {
|
||||
@@ -449,16 +449,14 @@ $_.receiver = function receiver(fn) {
|
||||
receive_fn = fn
|
||||
}
|
||||
|
||||
$_.start = function start(cb, program, ...args) {
|
||||
$_.start = function start(cb, program) {
|
||||
if (!program) return
|
||||
|
||||
var id = guid()
|
||||
if (length(args) == 1 && is_array(args[0])) args = args[0]
|
||||
var startup = {
|
||||
id,
|
||||
overling: $_.self,
|
||||
root,
|
||||
arg: args,
|
||||
program,
|
||||
}
|
||||
greeters[id] = cb
|
||||
@@ -582,14 +580,14 @@ var need_stop = false
|
||||
return
|
||||
}
|
||||
|
||||
for (var msg of message_queue) {
|
||||
arrfor(message_queue, function(msg) {
|
||||
if (msg.startup) {
|
||||
// now is the time to actually spin up the actor
|
||||
actor_mod.createactor(msg.startup)
|
||||
} else {
|
||||
actor_send(msg.actor, msg.send)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
message_queue = []
|
||||
}
|
||||
@@ -803,7 +801,7 @@ $_.clock(_ => {
|
||||
var pkg = file_info ? file_info.package : null
|
||||
var use_fn = function(path) { return shop.use(path, pkg) }
|
||||
|
||||
// Call with signature: setup_module(args, use, ...capabilities)
|
||||
// Call with signature: setup_module(args, use, ..capabilities)
|
||||
// The script wrapper builds $_ from the injected capabilities for backward compatibility
|
||||
var val = call(locator.symbol, null, _cell.args.arg, use_fn, ...vals)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user