mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
While I can't really test this thoroughly, Pat Knight and the Solaris
man pages suggest that the proper thing to do is to add THR_NEW_LWP to the flags on thr_create(), and that there really isn't a downside, so I'll do that.
This commit is contained in:
parent
7cf904736e
commit
495894ee66
1 changed files with 2 additions and 1 deletions
|
@ -77,7 +77,8 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar
|
||||||
funcarg = (struct func_arg *) malloc(sizeof(struct func_arg));
|
funcarg = (struct func_arg *) malloc(sizeof(struct func_arg));
|
||||||
funcarg->func = func;
|
funcarg->func = func;
|
||||||
funcarg->arg = arg;
|
funcarg->arg = arg;
|
||||||
if (thr_create(0, 0, new_func, funcarg, THR_DETACHED, 0)) {
|
if (thr_create(0, 0, new_func, funcarg,
|
||||||
|
THR_DETACHED | THR_NEW_LWP, 0)) {
|
||||||
perror("thr_create");
|
perror("thr_create");
|
||||||
free((void *) funcarg);
|
free((void *) funcarg);
|
||||||
success = -1;
|
success = -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue