[openbeos] Re: odd code in expander

  • From: "Jonas Sundstrom" <kirilla@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 19 Apr 2004 12:10:57 +0200 CEST

Alan Westbrook <alan@xxxxxxxxxxxxxx> wrote:
 ...
>      status_t status = B_OK;
>      thread_info thread_info;
>      status = get_thread_info (fThreadId, &thread_info);
 ... 
>      if (status == B_OK) {
 ...
> 1) using get_thread_info to see if the thread is 
> ok is susceptable to race conditions.

if (status == B_OK) doesn't test if the thread is ok, 
but whether or not get_thread_info() was successful.

/Jonas Sundström.                www.kirilla.com


Other related posts: