Replace spawnLink with linkActor

This commit is contained in:
Emery Hemingway 2024-03-19 15:37:25 +00:00
parent bf8f7e9aaa
commit 399fd4a30c
3 changed files with 3 additions and 3 deletions

View File

@ -578,7 +578,7 @@ proc halfLink(facet, other: Facet) =
established: true,
)
proc spawnLink*(name: string; turn: var Turn; 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)
halfLink(turn.facet, result.root)
halfLink(result.root, turn.facet)

View File

@ -98,7 +98,7 @@ when defined(linux):
proc spawnTimerActor*(turn: var Turn; ds: Cap): Actor {.discardable.} =
## Spawn a timer actor that responds to
## dataspace observations of timeouts on `ds`.
spawnLink("timers", turn) do (turn: var Turn):
linkActor("timers", turn) do (turn: var Turn):
let driver = spawnTimerDriver(turn.facet, ds)
let pat = inject(grab Observe(pattern: dropType LaterThan), {0: grabLit()})
during(turn, ds, pat) do (deadline: float):

View File

@ -258,7 +258,7 @@ type
nextLocalOid*: Option[Oid]
proc spawnRelay(name: string; turn: var Turn; opts: RelayActorOptions; setup: RelaySetup) =
spawnLink(name, turn) do (turn: var Turn):
linkActor(turn, name) do (turn: var Turn):
turn.preventInertCheck()
let relay = Relay(
facet: turn.facet,