Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] and how do you control which thread it runs on?

[DiscordArchive] and how do you control which thread it runs on?

[DiscordArchive] and how do you control which thread it runs on?

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
07-17-2024, 09:38 PM
#11
Archived author: Foe • Posted: 2024-07-17T21:38:32.699000+00:00
Original source

Okay, so I think I have it working now with a stop request and joinable thread, but I'm really not seeing the point of the stop request other than a nice-to-have?

Like realistically, I'd have to have stop request checks multiple places in the function for it to even have a chance to hit one of the requests. Only having a check at the end of the function is pointless, since it would have completed the function soon anyway and we'd just wait for the thread to be finished with whatever it's doing.

I could understand it if the thread workload was actually relatively large and thus the thread took a long time to finish, but in this case I don't really see the benefit from it
rektbyfaith
07-17-2024, 09:38 PM #11

Archived author: Foe • Posted: 2024-07-17T21:38:32.699000+00:00
Original source

Okay, so I think I have it working now with a stop request and joinable thread, but I'm really not seeing the point of the stop request other than a nice-to-have?

Like realistically, I'd have to have stop request checks multiple places in the function for it to even have a chance to hit one of the requests. Only having a check at the end of the function is pointless, since it would have completed the function soon anyway and we'd just wait for the thread to be finished with whatever it's doing.

I could understand it if the thread workload was actually relatively large and thus the thread took a long time to finish, but in this case I don't really see the benefit from it

rektbyfaith
Administrator
0
07-17-2024, 10:11 PM
#12
Archived author: jackpoz • Posted: 2024-07-17T22:11:32.022000+00:00
Original source

That's called also a cancellation token
rektbyfaith
07-17-2024, 10:11 PM #12

Archived author: jackpoz • Posted: 2024-07-17T22:11:32.022000+00:00
Original source

That's called also a cancellation token

rektbyfaith
Administrator
0
07-17-2024, 10:11 PM
#13
Archived author: Foe • Posted: 2024-07-17T22:11:59.356000+00:00
Original source

Yeah that thing
rektbyfaith
07-17-2024, 10:11 PM #13

Archived author: Foe • Posted: 2024-07-17T22:11:59.356000+00:00
Original source

Yeah that thing

rektbyfaith
Administrator
0
07-17-2024, 10:12 PM
#14
Archived author: jackpoz • Posted: 2024-07-17T22:12:00.359000+00:00
Original source

You don't really need it, what you need is to let it finish before deleting Eluna stuff
rektbyfaith
07-17-2024, 10:12 PM #14

Archived author: jackpoz • Posted: 2024-07-17T22:12:00.359000+00:00
Original source

You don't really need it, what you need is to let it finish before deleting Eluna stuff

rektbyfaith
Administrator
0
07-17-2024, 10:12 PM
#15
Archived author: jackpoz • Posted: 2024-07-17T22:12:26.897000+00:00
Original source

So just the joinable bit
rektbyfaith
07-17-2024, 10:12 PM #15

Archived author: jackpoz • Posted: 2024-07-17T22:12:26.897000+00:00
Original source

So just the joinable bit

rektbyfaith
Administrator
0
07-17-2024, 10:12 PM
#16
Archived author: Foe • Posted: 2024-07-17T22:12:29.568000+00:00
Original source

Yep, just pushed an update to the PR, this works fine, set the thread to sleep for 60 seconds and it gracefully shut down and no crashes
rektbyfaith
07-17-2024, 10:12 PM #16

Archived author: Foe • Posted: 2024-07-17T22:12:29.568000+00:00
Original source

Yep, just pushed an update to the PR, this works fine, set the thread to sleep for 60 seconds and it gracefully shut down and no crashes

Pages (2): Previous 1 2
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)