I’m assuming nobody following me uses NSDistributedLock; if there is, cut it out. I think it’s not deprecated ‘cause we forgot it existed.
@Catfish_Man What else would you suggest when there are multiple processes accessing the same file?
-
-
.
@mjtsai in ascending order of squickiness: • a database • have one process use XPC to talk to a single writer • defaults • flock() - View other replies
-
@Catfish_Man Those aren't near as convenient as distributed locks with a network filesystem, but I guess that's not common these days. - View other replies
-
@mjtsai NSDistributedLock is a mkdir() spinlock. It’s prone to orphaned locks, doesn’t support donation, and is slow :/ - View other replies
-
@Catfish_Man I'm not using it, and it's pretty clear it would have limitations like that. But seems like a reasonable LCD option to have…
-
-
-
@mjtsai@Catfish_Man: Short answer: SQLite. Literally made for exactly this purpose. - View other replies
-
@numist@mjtsai@Catfish_Man I was under the impression that SQLite would need writes coordinated? -
@rickfillion@numist@Catfish_Man SQLite does its own file locking. -
@mjtsai@rickfillion@Catfish_Man: I would be very interested in any situations where it does the wrong thing. -
@numist@mjtsai@Catfish_Man noted. Good to know.
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
David Smith
Michael Tsai
Scott
Rick Fillion