Functions calling in DWS.

Issue #230 new
Alex Bespalov created an issue

I have a system of “events”, which can be fired by network packets handler, timers, etc. Event execution means calling a method from normal working script (from same script thread).

Principle of work: When called script method “Wait”, it sleep for a short period of time, and between sleeping checks for a event queue, if not empty - calling event handler (run script method) in this script.

Originally, system was implemented for short actions in event handlers - switch “semaphore” variables, send something, etc.

Normally, thats system works without issues, BUT. Some strange guys start writing in event handlers huge code parts, like script-in-script, including “Wait” methods, that leads to calling new events, when previous one is not completed yet.

Today, after LONG investigation, i found, that PS can raise memory corruption in its stack, when few script methods called at same time.

Eric, please advice, if DWS more safe from this side (i mean potential calling multiply methods of working script at same time) ?

I look myself, found nothing, but maybe some hidden stones there.

Comments (0)

  1. Log in to comment