Post

Replies

Boosts

Views

Activity

Reply to iOS Inter-process communication
Yes it's the NSE. Isn't there any other way for in-memory locks? File based may cause some issues if the NSE process got killed by the OS for any reason while the file is in a locked state by the NSE. So there will be a need to implement another solution to track the state of the file based lock + the notification between the processes. It seems complex and fragile. Are there any alternatives? Like a shared operation queue or a lock that can be shared between the processes? Thank you
May ’24
Reply to iOS Inter-process communication
[quote='788941022, DTS Engineer, /thread/755758?answerId=788941022#788941022'] It’s possible to share a lock between two processes [/quote] What are the APIs for handling a shared lock between processes? [quote='788941022, DTS Engineer, /thread/755758?answerId=788941022#788941022'] Even if it is, it may end up being suspended, and it’d be bad if a process got suspended while holding this lock. [/quote] What will happen if a process got killed while holding the lock? Will the lock get released or it will be held until all other processes be killed? How does a shared in-memory lock work in this case? [quote='788941022, DTS Engineer, /thread/755758?answerId=788941022#788941022'] Similarly, if your app wants to provide read-only access to a database to the appex, or vice versa, you can do that on top of rename [/quote] Could you please elaborate on how to it? Thanks
May ’24
Reply to iOS Inter-process communication
Using the rename system call is much clearer now thanks. OTOH, could you please share how an in-memory lock shared between processes work in the case discussed before and what are the APIs for it? Also, what will happen if a process got killed while holding the lock? Will the lock get released or it will be held until all other processes be killed? Thank you
May ’24