[DiscordArchive] and how do you control which thread it runs on?
[DiscordArchive] and how do you control which thread it runs on?
Archived author: Tea • Posted: 2024-07-17T21:00:57.089000+00:00
Original source
and how do you control which thread it runs on?
Archived author: jackpoz • Posted: 2024-07-17T21:01:01.282000+00:00
Original source
before that it was BeginInvoke and EndInvoke hell
Archived author: jackpoz • Posted: 2024-07-17T21:01:12.006000+00:00
Original source
it runs on the .NET thread-pool
Archived author: Tea • Posted: 2024-07-17T21:01:20.571000+00:00
Original source
ah yes, "magic"
Archived author: jackpoz • Posted: 2024-07-17T21:01:33.274000+00:00
Original source
if you want to control the thread, then you go to the old way of managing your own threads
Archived author: jackpoz • Posted: 2024-07-17T21:01:44.211000+00:00
Original source
but for short lived tasks it's better to use the threadpool
Archived author: jackpoz • Posted: 2024-07-17T21:02:00.467000+00:00
Original source
as spawning threads is resource intensive (compared to not spawning them )
Archived author: Foe • Posted: 2024-07-17T21:02:02.935000+00:00
Original source
Yeah there's no concurrency with coroutines, so it's quite a lot simpler
Archived author: jackpoz • Posted: 2024-07-17T21:02:45.850000+00:00
Original source
Shauren: fun fact with BotFarm, spawning 1000 bots with each update loop as a task doesn't work that well
Archived author: jackpoz • Posted: 2024-07-17T21:03:35.238000+00:00
Original source
the overhead of creating and polling each Task is just too much, but I haven't compared it to having 1000 threads