Lekuruu / osu.py

A python library that emulates the osu! stable client
MIT License
10 stars 1 forks source link

Implement task system #4

Closed Lekuruu closed 1 year ago

Lekuruu commented 1 year ago

I recently experimented with threading and found out that the game client has a lot of issues with it. So instead of investigating the issue, I implement a synchronous task queue that does everything I need for now.

In the future, I want to fix the threading issues and add support for it, in the task system.

Here is an example of registering a task:

# Example of a task, running every minute
@game.tasks.register(minutes=1, loop=True)
def example_task():
  ...