-
Notifications
You must be signed in to change notification settings - Fork 1
Asynchronous Skills
Welcome to the world of asynchronous skills! These little gems are like the secret agents of your code—they operate independently, silently, and with purpose.
Think of them as the virtuosos of parallelism. These skills are subclasses of the formidable ShorniSplash skill.
They possess the art of asynchronous execution—a dance that happens on a separate CPU core.
place the code you want to run asynchronously in the async_func (static function) override(in the subclass skill). also override the trigger method of the skill to set it's engagement condition.
see code example in the python version async_skills file. https://github.com/yotamarker/public-livinGrimoire/blob/master/livingrimoire%20start%20here/LivinGrimoire%20python/python%20files/async_skills.py
the code in the async function will run on a daemon thread asynchronously on a separate CPU core from the main program, ensuring a smooth run.
if your skill code takes a while to run, for example making an API request, getting an RSS feed and such, you should use this async technique.
These skills deserve epic names. Start them with "Da" (representing "the async"). Imagine you're christening a digital superhero!