Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
b10b9898
Commit
b10b9898
authored
Feb 20, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increasing master thread priority on Windows
parent
ba8b0738
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
mongoose.c
mongoose.c
+7
-5
No files found.
mongoose.c
View file @
b10b9898
...
...
@@ -4029,13 +4029,15 @@ static void master_thread(struct mg_context *ctx) {
struct
socket
*
sp
;
int
max_fd
;
#if defined(ISSUE_317)
// Increase priority of the master thread
#if defined(_WIN32)
SetThreadPriority
(
GetCurrentThread
(),
THREAD_PRIORITY_ABOVE_NORMAL
);
#endif
#if defined(ISSUE_317)
struct
sched_param
sched_param
;
int
policy
;
pthread_getschedparam
(
pthread_self
(),
&
policy
,
&
sched_param
);
sched_param
.
sched_priority
=
sched_get_priority_max
(
policy
);
pthread_setschedparam
(
pthread_self
(),
policy
,
&
sched_param
);
sched_param
.
sched_priority
=
sched_get_priority_max
(
SCHED_RR
);
pthread_setschedparam
(
pthread_self
(),
SCHED_RR
,
&
sched_param
);
#endif
while
(
ctx
->
stop_flag
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment