What's new

Issue Combining Nils Seberg Functions with Task Functions

S.M.F

Member
Hi,

I have a question regarding the different Function Types. I am using the Nils Seberg Script Editor in sublime and therefore I use Nils-Seberg Functions and Task Functions. Both seems to come with different challenges.

For anyone who cares I've atached some observations I have made, but I think I'm not even close to knowing all the limitations of each one. But to be clear I am referring to the Nils Seberg function , which you "call" by just writing the function name followed by brackets and which will when compiled, more or less just copy the code within the function:


THE ISSUE:

I have come across issues with combining the Nilse Seberg Editor Function from above with the task function. It seems to not work well with task functions that have arguments and are called within a normal Nils Seberg Function, as it claims no arguments are passed even though I'm passing the arguments (picture attached).

But when I try the same in a minimal test example it all seems to work, so I'm not quite sure what the challenge could be here. I have many levels of abstraction so I'm calling a function on the highest level which then calls a function which then calls some other functions and so on. Is it an issue mixing functions with task functions? Does anyone have a better idea of the limitations of both functions and the challenges in calling on type in the other.

All Input is appreciated!

All the best,
Sebastian
 

Attachments

  • functionTypes.txt
    6.4 KB · Views: 1
  • Bildschirmfoto 2024-02-02 um 16.54.23.png
    Bildschirmfoto 2024-02-02 um 16.54.23.png
    27.1 KB · Views: 0
BTW the surname is Liberg :)

In general you should only use taskfuncs if you need the benefits they offer (thread safety when using wait()). If you don't, use regular functions.
 
BTW the surname is Liberg :)

In general you should only use taskfuncs if you need the benefits they offer (thread safety when using wait()). If you don't, use regular functions.
Thank you! Oh true, don't know what my brain did there butchering his name.

Is there a documentation regarding the details of the task function? I thought it makes sense using them for repeated actions as the code is being called instead of copied inline just regarding the CPU Usage. I guess for most tasks it doesn't make much of a difference but still.
 
Yes, there is documentation.

BTW inlining functions doesn't really impact CPU usage, but it does make compiled code unnecessarily bloated.
 

Attachments

  • TCM User Guide.pdf
    152.4 KB · Views: 0
Top Bottom