Skip to content

Commit

Permalink
=doc,actorable we don't scan by filename anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ktoso committed Nov 19, 2019
1 parent 8b8c2b6 commit dada36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Docs/actorables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ The project will be checked out and available in `.build/checkouts/swift-distrib
swift run --package-path .build/checkouts/swift-distributed-actors GenActors
----

The GenActors command by default inspects the `Sources` directory for files which end with `+Actorable.swift`,
and applies source generation on them. Optionally, you may pass folder paths or file names.
The GenActors command by default inspects the `Sources` directory for files and detects top level types conforming to the
api:Actorable[protocol] protocol. Optionally, you may pass folder paths or file names explicitly.

=== Actorables and Serialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ struct ContextGreeter: Actorable {

// tag::self_myself_call[]
public struct InvokeFuncs: Actorable {

let context: Myself.Context

public func doThingsAndRunTask() -> Int {
context.log.info("Doing things...")
self.context.log.info("Doing things...")

// invoke the internal task directly, synchronously
let result: Int = self.internalTask() // <1>
Expand All @@ -74,7 +73,7 @@ public struct InvokeFuncs: Actorable {

public func doThingsAsync() -> Reply<Int> { // <2>
// send myself a message to handle internalTask() in the future
let reply: Reply<Int> = context.myself.internalTask() // <3>
let reply: Reply<Int> = self.context.myself.internalTask() // <3>
return reply
}

Expand Down

0 comments on commit dada36c

Please sign in to comment.