Boost logo

Boost :

Subject: [boost] [thread]when thread_resource_error is thrown?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-11-18 17:02:32


Hi,

the documentation states that the a lot of functions throwing in the Thread library throw thread_resource_error.

I have do a grep on new allocation and I get

Vicente_at_viboes1 ~/SVN/boost/thread
$ grep -r "new " *
detail/thread.hpp: std::auto_ptr<thread> new_thread(new thread(thread
func));
pthread/thread_heap_alloc.hpp: return new T();
pthread/thread_heap_alloc.hpp: return new T(static_cast<A1&&>(a1));
pthread/thread_heap_alloc.hpp: return new T(static_cast<A1&&>(a1),sta
tic_cast<A2&&>(a2));
pthread/thread_heap_alloc.hpp: return new T(static_cast<A1&&>(a1),sta
tic_cast<A2&&>(a2),
pthread/thread_heap_alloc.hpp: return new T(static_cast<A1&&>(a1),sta
tic_cast<A2&&>(a2),
pthread/thread_heap_alloc.hpp: return new T(a1);
pthread/thread_heap_alloc.hpp: return new T(a1,a2);
pthread/thread_heap_alloc.hpp: return new T(a1,a2,a3);
pthread/thread_heap_alloc.hpp: return new T(a1,a2,a3,a4);
thread_specific_shared_ptr.hpp:// We don't need any more a new class thread that
 inherits from boost::thread,
thread_specific_shared_ptr.hpp: tss_ptr = new tss_type(*
this);
win32/condition_variable.hpp: entry_ptr new_entry(new list_en
try(wake_sem));
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T();

win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(st
atic_cast<A1&&>(a1));
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(st
atic_cast<A1&&>(a1),static_cast<A2&&>(a2));
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(st
atic_cast<A1&&>(a1),static_cast<A2&&>(a2),
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(st
atic_cast<A1&&>(a1),static_cast<A2&&>(a2),
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(a1
);
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(a1
,a2);
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(a1
,a2,a3);
win32/thread_heap_alloc.hpp: T* const data=new (heap_memory) T(a1
,a2,a3,a4);

Where the std::bad_alloc exception is catched?

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk