sleepy-discord icon indicating copy to clipboard operation
sleepy-discord copied to clipboard

How to deal with long tasks?

Open Zeks opened this issue 5 years ago • 3 comments

When received message requires some processing, I would like to send it to a separate thread, but then OnMessage slot closes and I am not sure where to call the sendMessage response once the work on the task is finished.

And I certainly can't cycle within the OnMessage slot until the work is done.

(using the develop branch atm)

Zeks avatar Dec 27 '18 04:12 Zeks

I am specifically asking because schedule() isn't really that. because you can't know when the task is going to finish ahead of time.

Zeks avatar Dec 27 '18 13:12 Zeks

I don't know what you mean by the onMessage slot closes. I also don't understand what you are trying to do other then trying to move some processing to a separate thread.

yourWaifu avatar Dec 27 '18 20:12 yourWaifu

Yes, I was trying to separate long task. I think I have managed it.

Zeks avatar Dec 28 '18 00:12 Zeks