Hi
I've 2 independen AHK-Scripts (A & B) which use the same AHK-Library, Class_MySQLAPI.ahk and therewith I query my databases.
Both script A and script B are time driven and run periodically (eg. A every 60 sec and B every 180 sec).
Now I found, that if, A sends a query to my database and B wants to query the same or other databases at same time, I'm getting "libmysql.dll" not found - that .dll is called/required by Class_MySQLAPI.ahk.
To solve that, I wanted A to check, before it starts a query, wether B isnt quering the databases just in that second and vice versa.
I kow, I could use a lock file (A -> writes lockfile, A-> query database, A->deletes lockfile and B checks wether that lockfile exists before it starts its query and vice versa), but probably there is a more elegant, a better way for locking those scripts against each other not to use the same Module (which then means the same .dll) at the same time ?
Regards
J.B.
2 scripts call same .dll concurrent, desyncronize
2 scripts call same .dll concurrent, desyncronize
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Who is online
Users browsing this forum: peter_ahk and 369 guests