prevent linux thread from being interrupted by scheduler

后端 未结 5 603
别那么骄傲
别那么骄傲 2020-12-01 10:49

How do you tell the thread scheduler in linux to not interrupt your thread for any reason? I am programming in user mode. Does simply locking a mutex acomplish this? I wa

5条回答
  •  温柔的废话
    2020-12-01 11:51

    Why not simply let the competing threads block, then the scheduler will have nothing left to schedule but your living thread? Why complicate the design second guessing the scheduler?

提交回复
热议问题