|
Boost Users : |
Subject: Re: [Boost-users] [Thread] Interrupting a thread causes a segmentation fault
From: Michael Chisholm (chisholm_at_[hidden])
Date: 2011-02-18 14:15:17
I don't think it's a boost problem. As a data point, it worked fine for me:
$ g++ -static -I $BH/include/boost-1_45 -L $BH/lib crashtest.cpp \
-lboost_thread-mgw45-mt-1_45
$ ./a.exe
MAIN: Created thread; sleeping now.
MAIN: About to interrupt thread.
MAIN: Sent interrupt to thread.
THREAD: Ending.
MAIN: Thread has ended.
I am using MinGW 4.5.0 on WinXP:
$ g++ -v
Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror
--build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC)
Andy
On 2/17/2011 3:39 PM, W Frane wrote:
>
>> Perhaps you need -mthreads?
>>
>> - Marsh
>
> Thank you for the suggestion, but unfortunately adding -mthreads did not
> resolve the issue. (Threaded programs without interrupts work fine,
> incidentally; it appears to be the interrupts that are causing the
> problem, not multithreading in general.)
>
>
>
> William
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net