AutoHotkey.dll (AhkDllThread) Topic is solved

Ask for help, how to use AHK_H, etc.
lsh

AutoHotkey.dll (AhkDllThread)

14 Sep 2017, 06:55

Code: [Select all] [Download] GeSHi © Codebox Plus

loop,10000
{
AhkDllRank% A_index%: = AhkDllThread(%ScriptDir%\autohotkey_H_unicode_32.dll)
ScriptPath: = A_ScriptDir. "\ ". A_index. ". ahk "
SFile: = FileOpen (ScriptPath, "r ")
SText: = SFile.Read ()
SFile.Close ()
AhkDllRank% A_index% .AhkTextDll(SText)
}


If you run this script repeatedly, you will get 262 indexes (1 SFile -> 100KB)

[Error Continuable exception_access_violation
Mouse and Keyboard hooks have benn disabled.
-Press Yes to exit thread and continue execution
-Press no to continue thread (debug).
-Press cancel to exit application
exception was caused in thread id : 8004]

Error.

My guess is that there is a maximum limit for multithreading in A's,

Is there a way to perform 1000 indexes ... and even 10000 indexes without difficulty :?:
edit: duplicate post removed
HotKeyIt
Posts: 1549
Joined: 29 Sep 2013, 18:35
Contact:

Re: AutoHotkey.dll (AhkDllThread)  Topic is solved

14 Sep 2017, 15:19

There is a limit for the Stack StackReserveSize * Threads, see: https://github.com/HotKeyIt/ahkdll/blob ... xproj#L168
ExeThread in AHK_H v2 can handle a lot more threads, following stops for me at ~3500 threads:

Code: [Select all] [Download] GeSHi © Codebox Plus

loop 10000
e%A_Index%:=ExeThread("#Persistent"),ToolTip(A_Index)

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 2 guests