Author Topic: Concurrency  (Read 1015 times)

mattias

  • Newbie
  • *
  • Posts: 3
    • View Profile
Concurrency
« on: April 11, 2015, 03:17:37 pm »
I'd like my timer scripts to avoid race conditions, but I haven't been able to find any definitive information about how lua scripts are run by the Solarus engine.

Can there be more than one thread running at any one time? Are threads ever pre-empted?

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1173
    • View Profile
Re: Concurrency
« Reply #1 on: April 12, 2015, 08:04:38 pm »
All Lua scripts run is the same thread. If several timers expires in at same cycle, I think the first one created is treated first.