mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
coroutines: reduce default stack size from 8 MB to 8 KB
This commit is contained in:
parent
0963069b98
commit
458aab4820
2 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ fn C.photon_set_log_output_stderr()
|
||||||
fn C.photon_set_log_output_null()
|
fn C.photon_set_log_output_null()
|
||||||
fn C.photon_join_current_thread_into_workpool() int
|
fn C.photon_join_current_thread_into_workpool() int
|
||||||
fn C.photon_thread_create_and_migrate_to_work_pool(f voidptr, arg voidptr)
|
fn C.photon_thread_create_and_migrate_to_work_pool(f voidptr, arg voidptr)
|
||||||
fn C.photon_thread_create(f voidptr, arg voidptr)
|
fn C.photon_thread_create(f voidptr, arg voidptr, stack_size u64)
|
||||||
fn C.photon_thread_migrate()
|
fn C.photon_thread_migrate()
|
||||||
|
|
||||||
// fn C.photon_thread_migrate(work_pool voidptr)
|
// fn C.photon_thread_migrate(work_pool voidptr)
|
||||||
|
|
|
@ -164,7 +164,7 @@ fn (mut g Gen) spawn_and_go_expr(node ast.SpawnExpr, mode SpawnGoMode) {
|
||||||
if util.nr_jobs > 1 {
|
if util.nr_jobs > 1 {
|
||||||
g.writeln('photon_thread_create_and_migrate_to_work_pool((void*)${wrapper_fn_name}, &${arg_tmp_var});')
|
g.writeln('photon_thread_create_and_migrate_to_work_pool((void*)${wrapper_fn_name}, &${arg_tmp_var});')
|
||||||
} else {
|
} else {
|
||||||
g.writeln('photon_thread_create((void*)${wrapper_fn_name}, &${arg_tmp_var});')
|
g.writeln('photon_thread_create((void*)${wrapper_fn_name}, &${arg_tmp_var}, 8 * 1024);')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.writeln('// end go')
|
g.writeln('// end go')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue