-
I read #6831 and learned this:
This leads me to a very strange conclusion: In I don't think this is correct, because the main thread doesn't do anything. I think I'm misunderstanding something. In general, I want to know what we should do in the main function. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Actually, the work-stealing or not doesn't matter for this topic as For multi thread runtime, since the thread who runs |
Beta Was this translation helpful? Give feedback.
Actually, the work-stealing or not doesn't matter for this topic as
block_on
always blocks the current thread. Work-stealing is an optimization which targets to worker thread. For example, there is an async task does AI reasoning running on a worker thread, this prevents the worker thread from executing async tasks in the local task queue. Work-stealing allow another idle worker threads steal tasks from other worker threads. However, thread who runs theblock_on
doesn't have the local task queue, so work stealing doesnt matter.For multi thread runtime, since the thread…