Invert spawnActors arguments

This commit is contained in:
Emery Hemingway 2024-03-27 17:46:26 +00:00
parent 6bcf039dc2
commit 8b79dce5ba
2 changed files with 4 additions and 4 deletions

View File

@ -550,7 +550,7 @@ proc bootActor*(name: string; bootProc: TurnAction): Actor {.discardable.} =
turn.desc.cause.external.description = "bootActor".toPreserves turn.desc.cause.external.description = "bootActor".toPreserves
turnQueue.addLast turn turnQueue.addLast turn
proc spawnActor*(name: string; turn: var Turn; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} = proc spawnActor*(turn: var Turn; name: string; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} =
let actor = newActor(name, turn.facet) let actor = newActor(name, turn.facet)
queueEffect(turn, actor.root) do (turn: var Turn): queueEffect(turn, actor.root) do (turn: var Turn):
var newOutBound: Table[Handle, OutboundAssertion] var newOutBound: Table[Handle, OutboundAssertion]
@ -564,7 +564,7 @@ proc spawnActor*(name: string; turn: var Turn; bootProc: TurnAction; initialAsse
actor actor
proc spawn*(name: string; turn: var Turn; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} = proc spawn*(name: string; turn: var Turn; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} =
spawnActor(name, turn, bootProc, initialAssertions) spawnActor(turn, name, bootProc, initialAssertions)
type StopOnRetract = ref object of Entity type StopOnRetract = ref object of Entity
@ -580,7 +580,7 @@ proc halfLink(facet, other: Facet) =
) )
proc linkActor*(turn: var Turn; name: string; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} = proc linkActor*(turn: var Turn; name: string; bootProc: TurnAction; initialAssertions = initHashSet[Handle]()): Actor {.discardable.} =
result = spawnActor(name, turn, bootProc, initialAssertions) result = spawnActor(turn, name, bootProc, initialAssertions)
halfLink(turn.facet, result.root) halfLink(turn.facet, result.root)
halfLink(result.root, turn.facet) halfLink(result.root, turn.facet)

View File

@ -1,6 +1,6 @@
# Package # Package
version = "20240320" version = "20240327"
author = "Emery Hemingway" author = "Emery Hemingway"
description = "Syndicated actors for conversational concurrency" description = "Syndicated actors for conversational concurrency"
license = "Unlicense" license = "Unlicense"