sleepy-discord
sleepy-discord copied to clipboard
How to deal with long tasks?
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)
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.
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.
Yes, I was trying to separate long task. I think I have managed it.