Skip to content

Commit e83a95f

Browse files
committed
relax background timeout
1 parent b33a257 commit e83a95f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/base/base_entry_point.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ main_thread_base_entry_point(int arguments_count, char **arguments)
108108
U64 num_async_threads = os_get_system_info()->logical_processor_count;
109109
U64 num_main_threads_clamped = Min(num_async_threads, num_main_threads);
110110
num_async_threads -= num_main_threads_clamped;
111+
String8 num_async_threads_string = cmd_line_string(&cmdline, str8_lit("async_thread_count"));
112+
if(num_async_threads_string.size != 0)
113+
{
114+
try_u64_from_str8_c_rules(num_async_threads_string, &num_async_threads);
115+
}
111116
num_async_threads = Max(1, num_async_threads);
112117
Barrier barrier = barrier_alloc(num_async_threads);
113118
LaneCtx *lane_ctxs = push_array(scratch.arena, LaneCtx, num_async_threads);
@@ -189,7 +194,7 @@ async_thread_entry_point(void *params)
189194
{
190195
if(!ins_atomic_u32_eval(&async_loop_again))
191196
{
192-
MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+100000);
197+
MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+1000000);
193198
}
194199
ins_atomic_u32_eval_assign(&async_loop_again, 0);
195200
ins_atomic_u32_eval_assign(&async_loop_again_high_priority, 0);

0 commit comments

Comments
 (0)