actor Questions
2
Consider the following, relatively simple Swift program:
import Foundation
func printContext(function: String = #function, line: Int = #line) {
print("At \(function):\(line): Running on \(Th...
Kalgan asked 31/8, 2022 at 20:2
3
Solved
Context
I have a Mac app that uses the old QuickLook protocols: QLPreviewPanelDataSource and QLPreviewPanelDelegate. You select a row in an NSTableView, hit the spacebar, and you get the QuickLook ...
Transverse asked 11/9, 2023 at 22:39
1
I need to setup a dictionary in an Actor. When I try the code the below I get a Actor-isolated instance method can not be referenced from a non-isolated context.
actor SimpleActor
{
var myDict: [I...
3
I've been watching Apple's concurrency talks from WWDC21 as well as reading a ton of articles on Apple's concurrency updates; however, I cannot wrap my head around one thing: Why do people provide ...
Milkwort asked 14/12, 2021 at 19:52
4
I’m currently learning about the Actor design pattern, or model, and it seems quite interesting. However, I’m struggling to find any decent real-world examples of how, or where, this model could be...
Intradermal asked 11/2, 2021 at 11:45
5
Solved
In Akka, is there a way to restrict messages to actors to be of a specific static type other than using the "Typed Actor" APIs that use an RPC style programming model?
Can I use the message passin...
3
Solved
I have an actor:
actor StatesActor {
var job1sActive:Bool = false
...
}
I have an object that uses that actor:
class MyObj {
let myStates = StatesActor()
func job1() async {
myStates....
Styrax asked 20/9, 2021 at 18:43
1
Solved
Reading the Concurrency section of the Swift Guide, I came across:
To create an unstructured task that runs on the current actor, call the Task.init(priority:operation:) initializer. To create an ...
Sofko asked 23/3, 2022 at 12:56
4
I've already read the question and answers to What design decisions would favour Scala's Actors instead of JMS?.
Usually, we use messaging solutions which have existed for years already: either a ...
3
Solved
Let's say we have the following goals:
We want to use actors.
We want to use dependency injection and resolve actors through DI.
We want to hide our actors behind protocols so we can vary the impl...
Cavernous asked 7/1, 2022 at 1:0
2
Solved
Is it correct to use Thread.sleep(5000); inside an actor? Does it actualy make an actor sleep for 5 seconds? Is there a simple alternative to make an actor sleep for some seconds?
Yager asked 11/9, 2014 at 14:23
5
When receiving events, Akka Actors will process one message at a time, blocking until a request has been completed before moving onto the next message.
This works well for synchronous/blocking tas...
2
Solved
I am doing some objective-C / iOS development and have heard several references to the Actor pattern. In Big Nerd Ranch book, it says:
An actor object is used when you have a long running task a...
Denitrify asked 26/7, 2012 at 18:11
1
Solved
I was looking at virtual Actors and I pumped into Dapr and Orleans.
I understand that Dapr is a more complete framework to build a microservices architecture, where virtual actors are just one part...
Agna asked 12/12, 2022 at 9:46
1
Solved
When I try to define an actor that conforms to a protocol, Xcode gives me the error Actor-isolated instance method 'foo()' cannot be used to satisfy nonisolated protocol requirement. I can make the...
Leffert asked 6/12, 2022 at 14:26
3
Solved
I am trying to read the keychain but the documentation warns me about the following:
SecItemCopyMatching blocks the calling thread, so it can cause your app’s UI to hang if called from the main th...
Harrus asked 26/10, 2022 at 15:7
3
Solved
Please note: I am a Java developer with no working knowledge of Scala (sadly). I would ask that any code examples provided in the answer would be using Akka's Java API.
I am trying to use the Akka...
2
Solved
I have one actor which is executing a forever loop that is waiting for the availability of data to operate on.
The doc says the Actor runs on a very lightweight thread, so I'm not sure whether i c...
2
Solved
I'm trying to create a basic akka cluster on a Win 7 machine from this documentation:
http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html
and I'm getting an error when I run the seed n...
Stephanistephania asked 31/7, 2013 at 15:33
1
Solved
Today I refactored a ViewModel for a SwiftUI view to structured concurrency. It fires a network request and when the request comes back, updates a @Published property to update the UI. Since I use ...
Unshod asked 29/3, 2022 at 19:29
1
Solved
I recently came across the nonisolated keyword in Swift in the following code:
actor BankAccount {
init(balance: Double) {
self.balance = balance
}
private var balance: Double
nonisolated f...
1
Solved
The following code is legal in Swift 5.5 (beta):
class Dog {
var name = "rover"
var friend : Dog? = nil
}
actor MyActor {
let dog = Dog()
}
func test() async {
let act = MyActor()
ac...
Lisabeth asked 20/8, 2021 at 15:28
5
Solved
The actor based paradigm is pretty cool. Its ability to scale effectively makes it a paradigm to must-evaluate for any concurrent system. I have done some reading about it, and have a decent idea a...
Radiotherapy asked 26/11, 2012 at 2:13
4
Solved
I am using draw.io online tool for drawing UML diagrams. When I am dragging an Actor from left panel to the canvas, there I found no options to rename the actor. For example I want to rename the de...
Hiphuggers asked 2/7, 2018 at 16:59
6
Solved
Is there any way to inject dependencies in to the Azure Service Fabric Actor's constructor?
Gifted asked 21/5, 2015 at 21:35
1 Next >
© 2022 - 2025 — McMap. All rights reserved.