Could I control thread count ?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Could I control thread count ?

Postby mung » Fri Nov 10, 2017 2:47 am

Hello :)

Could I control thread count in the OSR mode?
If I can, how to control the thread count?

Thank you :)

window 7 64bit, cef version is cef_binary_3.3029.1619.geeeb5d7.
mung
Mentor
 
Posts: 58
Joined: Wed Jan 04, 2017 12:20 am

Re: Could I control thread count ?

Postby magreenblatt » Fri Nov 10, 2017 10:07 am

What do you mean by "control thread count"?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Could I control thread count ?

Postby mung » Sun Nov 12, 2017 8:07 pm

magreenblatt wrote:What do you mean by "control thread count"?


I'm sorry for wrong asked.

Can I limit the number of threads?

For example, let's say when I run a program, CEF utilizes four threads, but I think that CEF uses too much of threads. Is there any way that I can limit the number of threads usage down to two. :D

thank you :)
mung
Mentor
 
Posts: 58
Joined: Wed Jan 04, 2017 12:20 am

Re: Could I control thread count ?

Postby magreenblatt » Sun Nov 12, 2017 9:12 pm

No, it's not possible to limit the number of threads.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Could I control thread count ?

Postby HarmlessDave » Sun Nov 12, 2017 11:04 pm

Why do you think there are too many threads? For a modern operating system it does not really matter if your program uses 1 thread or 20. The OS manages them.

Are you thinking of cores, or limiting CPU load? Threads are not cores, and 20 threads that are properly written (blocking not polling) and waiting for something to happen will use 0 CPU time.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Could I control thread count ?

Postby mung » Tue Nov 14, 2017 1:19 am

HarmlessDave wrote:Why do you think there are too many threads? For a modern operating system it does not really matter if your program uses 1 thread or 20. The OS manages them.

Are you thinking of cores, or limiting CPU load? Threads are not cores, and 20 threads that are properly written (blocking not polling) and waiting for something to happen will use 0 CPU time.


I am developing MMORPG game and it is important to control given resources. I wanted to reduce and limit the usage of CEF threads because OS will allocate more threads to the game.

If it is not possible, it's okay.

Thank you for your answer.

:)
mung
Mentor
 
Posts: 58
Joined: Wed Jan 04, 2017 12:20 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 36 guests