I'm writing an actor where I'm offloading a long task to its helper loop. That task needs access to the values of the actor's current private data, and then the actor needs to change private data depending on the results of the long analysis and the current private data.
My understanding is that actors are by value classes maintained in a shift register of actor core. Therefore in an actor's helper loop, which I create, I shouldn't make a second shift register with the actor's class wire -- that would create a copy of the actor's private data with all the potential bugs associated.
My issue is, within the helper loop's event I need access to the up to date private data of the actor's class. Now I thought about sending copies of the actor's private data when the event fires, but that has concurrency issues (if multiple such events are fired, and the first one modifies the private data the subsequent events will be making decisions based on stale data since I sent copies).
Do I want to send a reference to the actor's private data to the helper loop? Is that an Ok design within AF? I'm a little hesitant of that solution b/c now I have two things which might modify the actor's private data but maybe since helper loops are within actor its still "encapsulation". Not really sure...
If the data should more properly be state of the helper loop, move those fields out of the actor and into the helper loop. When the actor receives a message that needs to modify those fields, send a message to the helper loop (queue or user event) to do the action and modify the fields.
Interesting, so I've never considered having a separate state to maintain, that of the helper loop. I guess I was kind of gravitating towards actors are their own states so I should put everything in their private data. I guess I'm not seeing a downside to having long-task state data could go into the helper loop's shift register. Then periodically the helper loop fires off a message with the current state to the actor when the analysis finishes.
(My potential worry right now is a race condition where if in prelaunch init of a nested actor, a message is sent to root, and if root chooses to direct it to a helper loop, that root's helper loop might not be up and running yet.)
You don't have to worry about that. The communication channels are established even if the loops are not yet running, so the various "send" operations that you're wanting to do all succeed. The parent enqueuer is already established, and any link you create from parent Actor Core to helper loop will already be established by the time the parent receives the message.
Messages are handled in Actor Core (or, more clearly, the Call Parent Method node in your new Actor's Actor Core). Launch Nested Actor also doesn't return until Pre launch init returns, so if you have Launch Nested wired in series before Actor Core then you KNOW that Actor Core won't handle the new message until AFTER your nested actor has finished launching. The helper loops may or may not be running yet (it depends on where you put them of course). Like AQ said though, you're definitely not going to lose a message.
Just to sharpen my question, I'm not worried about losing a message. I'm worried about losing a user event that's fired by root but before root's helper loop, which has the event structure that's dynamically registered to handle the event, has begun to run yet.
How can I stop Composer from asking to install the helper application every time it is opened? I'm running 10.26.1.
Even though I enter admin credentials, it never seems to be happy.
Is anyone else seeing this or is it just me?
@sdamiano Just to clarify, it is expected that it will ask to install every time, even though I give it admin credentials to install and nothing has changed from the last time I opened it 2 minutes ago?
If it's not installed, you can navigate to the Composer.app>Show Package Contents>/Library/LaunchServices/ and copy the com.jamfsoftware.Composer.helper and place it in that location(/Library/PrivilegedHelperTools/). Not sure why it's not staying there for you after your initial "update" when you 1st opened it
@JustDeWon Thanks for the reply. That was my thought as well before I posted this thread. The problem is though, that is it there. That's why I was wondering if it was normal to continuously prompt me.
And for another data point, the computer I am currently on is a new install on a clean hard drive with Big Sur. This was happening previously on Catalina before the hard drive was wiped. Additionally, this happens on my laptop running Catalina as well.
So, it doesn't appear to be something specific to this computer from what I can tell. Hence the question, is this normal?
@jrippy , Actually I stand corrected. It prompts me to install each time I open as well. And I'm on Jamf 10.27.0 and macOS Big Sur. This could possibly be a bug with Jamf. I don't recall having to do this each time previously. But I'm hardly in Composer
@JustDeWon Thanks for verifying that. Glad to know I'm not crazy!
@poormatt Me too. I finally had a free moment though and searched the forums about it. Finding nothing, I decided to post this thread.
Like you, I assume most people just go with it.
I am also having the problem on a Big Sur machine(fresh install of OS) running 10.27. I can't create packages, but can create DMG files just fine. It prompt to install the helper tool every time. I have uninstalled & reinstalled and it does not help. Has anyone found a fix for this?
Tail var/log/system.log (tail -f /var/log/system.log) while opening Composer. if you see this in your entry "ownership/permissions path" check the posix permissions on the file com.jamfsoftware.Composer.helper.plist in /Library/LaunchDaemons/ to make sure they are set to 644 and root:wheel. Jamf did not set these correctly on the first install. Could be a misstep in their composer package ironically. This worked for me. Reopen Composer and you should be good to go. Cheers!
Just got done with a ticket with Jamf Support. this is "expected" behavior. Details below:
> This is expected behavior and was implemented in version 10.18 of Composer. Please see below:
> Privileged Helper Installation
> Composer now installs a privileged helper tool when first opened, which runs all Composer tasks that require root access. Administrator credentials are required to install the privileged helper each time Composer is opened. The following user experience improvements have been implemented with the privileged helper:
Jamf's purpose is to simplify work by helping organizations manage and secure an Apple experience that end users love and organizations trust. Jamf is the only company in the world that provides a complete management and security solution for an Apple-first environment that is enterprise secure, consumer simple and protects personal privacy. Learn about Jamf.
This site contains User Content submitted by Jamf Nation community members. Jamf does not review User Content submitted by members or other third parties before it is posted. All content on Jamf Nation is for informational purposes only. Information and posts may be out of date when you view them. Jamf is not responsible for, nor assumes any liability for any User Content or other third-party content appearing on Jamf Nation.
Hi,
I'm trying to move a folder that contains folders with photos in it from my dropbox to Files App in iPad. Previously it worked wonderfully and i can move them just fine. But, now after i updated to the latest iPad iOS 16.1, i can't move folders from my dropbox to my iPad in the File App. It still works when moving the picture directly though but its a pain to create the folder manually my self.
I've tried restarting my iPad, delete my dropbox and re-installing them, and reconnecting them all those stuff but still got those error when moving a folder. Any idea how to fix it? or is it a bug in the iPad iOS 16.1?
Did this post help you? If so, give it a Like below to let us know.
Need help with something else? Ask me a question!
Find Tips & Tricks Discover more ways to use Dropbox here!
Interested in Community Groups? Click here to join!