Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread] boost::this_thread::get_id causing interrupt
From: Yi Ding (yi.s.ding_at_[hidden])
Date: 2011-08-23 23:05:50


I found a solution, which was to use pthread_self instead. If anyone
more familiar with boost thread could tell me why the original code
didn't work, it'd be much appreciated.

On Mon, Aug 15, 2011 at 8:43 AM, Yi Ding <yi.s.ding_at_[hidden]> wrote:
> Hi everyone,
>
> I've been dipping my toes into boost threads, and I'm running into a
> strange issue.  What I'm trying to do is to run a comparison between
> thread_ids.  I have an object that's "owned" by a thread, and when
> something calls one of its functions, I'd like to compare the
> thread_id to the owner's thread id.  So I thought that
> boost::this_thread::get_id would do the trick to figure out what the
> current running thread's thread id is.  For some reason, when I call
> it, an interrupt is signalled to my main thread.  Is
> boost::this_thread::get_id not the right thing to use here?
>
> Thanks in advance,
> Yi
>


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