[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does Guile have a thread limit?
From: |
Taylan Ulrich Bayırlı /Kammer |
Subject: |
Re: Does Guile have a thread limit? |
Date: |
Sat, 05 Apr 2014 14:27:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) |
Eli Zaretskii <address@hidden> writes:
>> From: "Diogo F. S. Ramos" <address@hidden>
>> Date: Sat, 05 Apr 2014 03:28:25 -0300
>>
>> The following program is aborted:
>>
>> --8<---------------cut here---------------start------------->8---
>> (define number-of-thread 1000)
>>
>> (do ((i number-of-thread (- i 1)))
>> ((zero? i))
>> (call-with-new-thread (lambda () (sleep 42))))
>> --8<---------------cut here---------------end--------------->8---
>
> On what OS?
I can reproduce on OpenBSD 5.3 with Guile 2.0.11.
I wasn't sure if OpenBSD perhaps limits the number of pthreads allowed
to a process, so I used the following C program to test this, which had
all 1000 threads succeed:
/* start C code */
#include <pthread.h>
#include <stdio.h>
#include <stddef.h>
static void *thread_entry(void *arg)
{
printf("thread %d succeeded\n", (ptrdiff_t)arg);
return NULL;
}
int main()
{
ptrdiff_t i;
for (i = 0; i < 1000; ++i)
{
pthread_t thr;
pthread_create(&thr, NULL, thread_entry, (void *)i);
}
sleep(5);
puts("main finished");
return 0;
}
/* end C code */
Taylan
- Does Guile have a thread limit?, Diogo F. S. Ramos, 2014/04/05
- Re: Does Guile have a thread limit?, Eli Zaretskii, 2014/04/05
- Re: Does Guile have a thread limit?, Mark H Weaver, 2014/04/06
- Re: Does Guile have a thread limit?, Taylan Ulrich Bayırlı /Kammer, 2014/04/08
- Re: Does Guile have a thread limit?, Ludovic Courtès, 2014/04/08
- Re: Does Guile have a thread limit?, Taylan Ulrich Bayırlı /Kammer, 2014/04/08
- Re: Does Guile have a thread limit?, Ludovic Courtès, 2014/04/10
- Re: Does Guile have a thread limit?, Taylan Ulrich Bayırlı /Kammer, 2014/04/10
- Re: Does Guile have a thread limit?, Taylan Ulrich Bayirli/Kammer, 2014/04/25
- Re: Does Guile have a thread limit?, Mark H Weaver, 2014/04/26
- Re: Does Guile have a thread limit?, Taylan Ulrich Bayirli/Kammer, 2014/04/26