W wl Well-Known Member Licensed User Longtime User Mar 9, 2015 #1 Hi, I am writing a B4A app that will be using 2 background services (both 'StartAtBoot' BTW). Both services access the same storage file (keyvaluestore). One will be putting data in the storage and 1 will be removing from the storage. Will both services run in their own thread and to be thread-safe should I access the keyvalue store in a callsubdelayed ? Or should I use AGraham's threading library and use a semaphore to - open the keyvaluestore file - add or remove data - save the keyvalue store file ? Thanks
Hi, I am writing a B4A app that will be using 2 background services (both 'StartAtBoot' BTW). Both services access the same storage file (keyvaluestore). One will be putting data in the storage and 1 will be removing from the storage. Will both services run in their own thread and to be thread-safe should I access the keyvalue store in a callsubdelayed ? Or should I use AGraham's threading library and use a semaphore to - open the keyvaluestore file - add or remove data - save the keyvalue store file ? Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 10, 2015 #2 All of your code runs in the same thread. You do not need to worry about threading issues. Upvote 0