Stream: helpdesk (published)

Topic: Callback between two Julia processes


view this post on Zulip Jeffrey Vasel (Nov 07 2021 at 22:59):

Hi Everyone! Is there a way to do a callback between two Julia processes?

I am currently using @everywhere using Distributed with @everywhere using ParallelDataTransfer to read data from one Julia process into a second Julia process. ParallelDataTransfer has a simple function getfrom to retrieve data from another process. For example, tmp = getfrom(2, :stNumCtr) retrieves the value of variable stNumCtr from process ID #2 and stores it in tmp. However, it takes too long to retrieve the data (ie. 25 ms). Worse yet, I must read it frequently. I tried using @async getfrom(2,:stNumCtr) but the @async macro consumes memory over time and since I read it frequently, it quickly becomes a memory problem.

Is there a way to "speed" up the getfrom function?

Alternatively, I would like to have process ID #2 callback a function in process ID #1 with value stNumCtr.

Any thoughts please???


Last updated: Dec 28 2024 at 04:38 UTC