nomi-san / true-autoit-multi-threading

:rainbow: Yep, multi-threading in AutoIt.
MIT License
58 stars 8 forks source link
autoit autoit3 multi-threading multithreading

:rainbow: True AutoIt Multi-threading

:zap: Just an experiment to achieve multi-threading in AutoIt, as a library.

:clap: All issues and pull requests are welcome!

:bell: Give a star and subscribe (watch) to get notified about changes.

Usage

Download the latest release (or build from source).

Library files:

Simple example:

#NoTrayIcon
#include 'N.au3'

func task()
  MsgBox(0, '', "Hello, I'm in another thread.")
endfunc

func main()
  local $t = NRun('task')
  NWait($t)
endfunc

NMain('main')

More examples:

See N.au3 to get all APIs.

Build from source

Requirements:

Build steps:

FAQs

How it works?

Please see the C++ source code, I'll update soon 😀.

Does it work with compiled EXE.

Yep, it's designed for both running script in AutoIt.exe and compiled (also upx packed) EXE.

Memory leaks after threads done?

After the first thread is created, the memory increases once ~EXE size. And +80kB after each thread done, that isn't memory leaks, they are static members/smart pointers of AutoIt interpreter still alive. They will be freed when process exits.

Is its shared object faster than AutoItObject?

Yesh, it is implemented with hash table. I don't know why AutoItObject lookups property name through array sequentially.

Is there a magic?

Nope.

Thread safe?

Not implemented yet.