Home » U++ Library support » U++ MT-multithreading and servers » Different native pthread.h implementations
Re: Different native pthread.h implementations [message #30781 is a reply to message #30778] |
Sat, 22 January 2011 11:24   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
tojocky wrote on Sat, 22 January 2011 10:42 |
Maybe:
Thread::Id tid = Thread::GetCurrentId();
?
|
Then there are problems for thread_index Index container:
Web/socket.cpp: In function 'Upp::String& Upp::SockErrorText()':
Web/socket.cpp:824: error: invalid conversion from 'pthread*' to 'int'
Web/socket.cpp:824: error: initializing argument 1 of 'int Upp::AIndex<T, V, HashFn>::Find(const T&)
const [with T = int, V = Upp::Vector<int>, HashFn = Upp::StdHash<int>]'
Web/socket.cpp:827: error: invalid conversion from 'pthread*' to 'int'
Web/socket.cpp:827: error: initializing argument 1 of 'void Upp::AIndex<T, V, HashFn>::Add(const T&)
[with T = int, V = Upp::Vector<int>, HashFn = Upp::StdHash<int>]'
You need to create GetHashValue function for this type, even if you declare Index like following:
static Index<Thread::Id> thread_index;
In other words, there is needed an value, not a pointer to it.
[Updated on: Sat, 22 January 2011 12:31] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Aug 26 16:53:53 CEST 2025
Total time taken to generate the page: 0.04537 seconds
|