by Isaac Bates
Posted on December 26th 2019, 11:31 pm
The only changes should be in the new version of the module that I am releasing later this week. So, there are only a few changes compared to the main article.) Here's the article :
The main idea behind this module is that any script can run in multiple threads. It works like any other thread, except that each thread is in control of its own state and can handle multiple files, threads, timers, functions, and other event handlers.
First, let's go over the new version of the module. In this new release, we make a few new changes to the module. First, we allow scripts to be run in one of two ways. The first is to select one of several preconfigured scripts, either from a predefined list of scripts or from a separate file that contains a list of preconfigured scripts. The other approach is by importing a script manually, which I discussed in the article linked above.
Second, the module handles the creation of the shared state among each thread. This makes it much simpler for scripts to work with. Now every thread has an unique and unique object to manage the state of the thread (the thread object in Visual Studio), which is then shared across all of the threads.
Now that we've covered the changes in the version I'll be sending out later this week, I have four quick bits of information for you. The first is that it is not yet possible for a script block to have more than one context. I may change that in the future, but as of this writing, this won't work, since that type of state management is very new in .NET. It is possible, though, that I will add this ability.
The second thing I need to say before writing this blog post is that the module has not yet been tested in production environments. It is quite possible that it might cause unexpected behaviour in production environments. Again, though, I will be testing this module extensively, and will be releasing it into the wild as soon as it is completely stable.
Lastly, the module is only compatible with Mono 4.5 (there are no Mono 4.4 compatibility issues.)
If you would like more information on the main module that I'm releasing, you can go here . If you would prefer to learn about how to easily deploy and use the module, you can go here .