Replace spawnLink with linkActor
This commit is contained in:
parent
bf8f7e9aaa
commit
399fd4a30c
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue