Issue 154: Thread.current()
Status:  Fixed
Owner: ----
Closed:  Dec 2011
Reported by lucadelt...@googlemail.com, Dec 4, 2011
What steps will reproduce the problem?
import cpp.vm.Thread;
class Main {
static function main() {
  trace(Thread.current()==Thread.current()); //false
}
}

equally:
import cpp.vm.Mutex;
class Main {
static function main() {
  var m = new Mutex();
  m.acquire();
  m.acquire(); //blocks
}
}

What version of the product are you using? On what operating system?
Latest svn.

Please provide any additional information below.
linux 64bit

Dec 5, 2011
#1 lucadelt...@googlemail.com
Fix for mutex:

pthread mutex created (include/hx/Thread.h) is not recursive:

MyMutex constructor should be changed to:

   MyMutex() { 
        pthread_mutexattr_t mta;
        pthread_mutexattr_init(&mta);                                                    
        pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE); 
                
        pthread_mutex_init(&mMutex,&mta);
        mValid = true;
    }  
Dec 15, 2011
Project Member #2 gameh...@gmail.com
Thanks a lot for this patch.  I just assumed this was automatic with pthreads.
I have fixed the operator==, but it needs svn versions of hxcpp and haxe.
Status: Fixed