Rename syndicate/actors to syndicate/drivers
This commit is contained in:
parent
7c72ea5732
commit
403e54878c
|
@ -127,7 +127,7 @@ else:
|
||||||
discard close(fd)
|
discard close(fd)
|
||||||
driver.timers.excl(fd)
|
driver.timers.excl(fd)
|
||||||
|
|
||||||
proc spawnTimerActor*(turn: var Turn; ds: Cap): Actor {.discardable.} =
|
proc spawnTimerDriver*(turn: var Turn; ds: Cap): Actor {.discardable.} =
|
||||||
## Spawn a timer actor that responds to
|
## Spawn a timer actor that responds to
|
||||||
## dataspace observations of timeouts on `ds`.
|
## dataspace observations of timeouts on `ds`.
|
||||||
linkActor(turn, "timers") do (turn: var Turn):
|
linkActor(turn, "timers") do (turn: var Turn):
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "20240402"
|
version = "20240403"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "Syndicated actors for conversational concurrency"
|
description = "Syndicated actors for conversational concurrency"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
# SPDX-License-Identifier: Unlicense
|
# SPDX-License-Identifier: Unlicense
|
||||||
|
|
||||||
import std/times
|
import std/times
|
||||||
import syndicate, syndicate/actors/timers
|
import syndicate, syndicate/drivers/timers
|
||||||
|
|
||||||
runActor("timer-test") do (turn: var Turn):
|
runActor("timer-test") do (turn: var Turn):
|
||||||
let timers = newDataspace(turn)
|
let timers = newDataspace(turn)
|
||||||
spawnTimerActor(turn, timers)
|
spawnTimerDriver(turn, timers)
|
||||||
|
|
||||||
onPublish(turn, timers, ?LaterThan(seconds: 1356100000)):
|
onPublish(turn, timers, ?LaterThan(seconds: 1356100000)):
|
||||||
echo "now in 13th bʼakʼtun"
|
echo "now in 13th bʼakʼtun"
|
||||||
|
|
Loading…
Reference in New Issue