Bug in phobos Thread module?

kenny funisher at gmail.com
Sat May 12 10:04:16 PDT 2007


Lars Ivar Igesund wrote:
> kenny wrote:
> 
>> Regan Heath wrote:
>>> kenny Wrote:
>>>> I also experience the same issue in linux. It happens after I
>>>> create/delete over 8000 threads. I dunno why 8000 is the magic number,
>>>> but it is for my machine. I'll try and look into it as well on linux.
>>>> Just wanted to let you know that the problem also occurs in linux
>>> Each operating system has a maximum number of handles, it differs for
>>> operating system, each version of each operating system, and can be
>>> defined for each process upon execution as well.  Or so I recall from my
>>> travels.
>>>
>>> Regan Heath
>> wow, now it's only giving me 382 threads... here is test code. Later
>> today, I will dip into phobos and try and find the problem.
> 
> For what it's worth, the Tango version of Thread has several fixes and
> changes compared to the Phobos version, and also provides other features
> like thread local storage and fibers/co-routines.
> 

well, it looks like I'll be doing one of two things this weekend :)

1. read http://yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

2. install tango / tangbos

because I have to make a program by wednesday that needs to create unlimited threads over unlimited time (eg a daemon of sorts). I'll check out tango, as it sounds a lot easier than bugfixing tango. Thanks for the tip :)

Kenny



More information about the Digitalmars-d mailing list