BigEfromDaBX 25 Posted August 5, 2018 Report Share Posted August 5, 2018 Does sqlite have a limit on how many clients can connect to it. Can I run two bots to access the DB at the same time? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 6, 2018 Report Share Posted August 6, 2018 Yes that is fine and it can handle multiple connections but if you wanted to write from multiple sources it probably wouldn't hurt to use a mutex. Heopas plugin has a command called "system wide lock" which will allow you to create a mutex - basically this will only allow one program to access it at a time until it reaches the next command which you should use "system wide unlock" 2 Quote Link to post Share on other sites
BigEfromDaBX 25 Posted August 6, 2018 Author Report Share Posted August 6, 2018 Yes that is fine and it can handle multiple connections but if you wanted to write from multiple sources it probably wouldn't hurt to use a mutex. Heopas plugin has a command called "system wide lock" which will allow you to create a mutex - basically this will only allow one program to access it at a time until it reaches the next command which you should use "system wide unlock" I only want to write from two sources. Quote Link to post Share on other sites
BigEfromDaBX 25 Posted August 10, 2018 Author Report Share Posted August 10, 2018 Yes that is fine and it can handle multiple connections but if you wanted to write from multiple sources it probably wouldn't hurt to use a mutex. Heopas plugin has a command called "system wide lock" which will allow you to create a mutex - basically this will only allow one program to access it at a time until it reaches the next command which you should use "system wide unlock" Just thought of something. If i have one bot that is doing multi threading writing to the DB, wouldnt that be the same is several bots writing to that DB? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 14, 2018 Report Share Posted August 14, 2018 Just thought of something. If i have one bot that is doing multi threading writing to the DB, wouldnt that be the same is several bots writing to that DB? Yes, and you can use a thread lock for this if you want. 1 Quote Link to post Share on other sites
BigEfromDaBX 25 Posted August 14, 2018 Author Report Share Posted August 14, 2018 so is this an example of how it works. loop(500) { save("test")}define save(#text) { thread { plugin command("HeopasCustom.dll", "Heopas Thread Lock") save to file("C:\\test.txt",#text) plugin command("HeopasCustom.dll", "Heopas Thread Unlock") }} Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.