On onsdag, juli 24, 2002, at 12:20 , Marc M. Adkins wrote:
> >> It seems to >> take about a second for threads->new() to return, very odd, but it >> doesn't always happen as a small script I wrote to prove myself wrong >> ran fine (as long as I joined everything by the end of the block). > > Is it possible that your example where new() takes a long time is a > really > big program? Or one with a lot of data or packages loaded? Resulting > in a > lot of copying internally to create the subsidiary threads? As > compared to > a small test program where there isn't much to copy and the new() > returns > quickly? > > I'd be interested in any accumulated wisdom on how ithreads scale to > large > programs wrt the copying required to create a new thread. I suppose I > could > write some test scripts...if they don't already exist somewhere... > > mma > > I haven't found this to be a big problem, ofcourse it acts rather badly but one has to know about this limitation and work with pools. I am still considering an answer to your earlier email about the problems of cloning and parrot, just haven't had time yet ;). All my programs work with a master interpreter that has everything loaded but hasn't done anything, and then new threads are spawned off from that. All big data structures tend to be shared and as such do not need copying. In the future I hope to be able to clone just specific data that is needed for a thread, how this is supposed to work isn't really thought out yet, ideas welcome. Arthur
