However, Unity is a bit too encapsulated and doesn't offer enough flexibility and extensibility for me.
It doesn't appear to me that there is any way in Unity to create tasks in different threads that run your own code in the background.