Advertisement · 728 × 90
#
Hashtag
#ModelActor
Advertisement · 728 × 90

I’ve sat and thought about all operations users can do in my app, and only one or two of them really require to be conducted in the background. That means almost all my work with #ModelActor was purely educational. 😅
#BuildInPublic #IndieHacker #IndieDev

7 1 1 0

I wanted to work on adding group support to @letspark.it and I ended up working on notifications synchronization that led me to yet another #ModelActor weird behavior. 😂 However, not exactly thanks to that, but I discovered some problem.
#BuildInPublic #IndieDev #iOSDev

3 0 2 0
The image displays two Swift code snippets illustrating the importance of execution order in asynchronous tasks using `Task.detached`.
First Code Block:
- The task starts by calculating a value (`someValue`) asynchronously using `actor.calculateSomeValue()`, which runs in the background.
- Then, `self.someValueSetter(someValue)` is called to set the value, followed by `actor.someMethod()`, which explicitly runs on the main thread.
Second Code Block:
- The task starts similarly by calculating `someValue` with `actor.calculateSomeValue()` in the background.
- Next, `actor.someMethod()` is executed in the background instead of the main thread.
- Finally, `self.someValueSetter(someValue)` is called to set the value.
The image highlights that the order of operations affects whether certain methods run in the background or on the main thread.

The image displays two Swift code snippets illustrating the importance of execution order in asynchronous tasks using `Task.detached`. First Code Block: - The task starts by calculating a value (`someValue`) asynchronously using `actor.calculateSomeValue()`, which runs in the background. - Then, `self.someValueSetter(someValue)` is called to set the value, followed by `actor.someMethod()`, which explicitly runs on the main thread. Second Code Block: - The task starts similarly by calculating `someValue` with `actor.calculateSomeValue()` in the background. - Next, `actor.someMethod()` is executed in the background instead of the main thread. - Finally, `self.someValueSetter(someValue)` is called to set the value. The image highlights that the order of operations affects whether certain methods run in the background or on the main thread.

Another evening with ModelActor and another strange behavior. This time it's not the way of passing the arguments, but the order of method calling. @massicotte.org, are you interested? 😅
#Swift #ModelActor #SwiftConcurrency

2 0 2 1

Sorry @massicotte.org, for giving yet another example of strong behavior of ModelActor. I hope maybe you can understand why it’s behaving so strangely. 😅
#SwiftData #ModelActor

1 0 1 0

While moving the last operation into the background, I encountered the strange problem that my #ModelActor actually runs on MainActor. 🥲 I'll be reading (again) @massicotte.org’s article about ModelActor to understand what's going on tomorrow. I don't have energy for that today. 😆
#SwiftData

4 0 2 1