| Issue 154: | Thread.current() | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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 15, 2011
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
|
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; }