< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
#include <WinSock2.h>
#include <Windows.h>
#include <string>
#include <iostream>
using namespace std;
#include <rutil/ThreadIf.hxx>
using namespace resip;
#ifdef _DEBUG
#pragma comment(lib, "../lib/RutilD.lib")
#else
#pragma comment(lib, "../lib/Rutil.lib")
#endif
#pragma comment(lib, "ws2_32.lib")
class MyThread : public ThreadIf
{
public:
void thread()
{
while(isShutdown() == false)
{
Sleep(20000);
cout << "Exit....";
}
}
};
int main()
{
MyThread myThread;
myThread.run();
Sleep(100);
myThread.shutdown();
myThread.waitForShutdown(50000); -> It returned immediately, nevery waiting....
myThread.detach(); -> Now the thread still active, so sometimes will be raise crarsh error ?
cout << "After detach." << endl;
return 0;
}
On 29-Mar-08, at 13:11 , Karlsson wrote:
> I think the new ThreadIf class has problem. When I copy the ThreadIf
> files of 1.2.2 to replaced the 1.3.0 RC1, then all are working fine.
>
>
Hi Karlsson;
I just want to ask one clarifying question:
Does the problem happen when you use 1.3 RC 1 and build from a
completely clean copy of your source?
This implies recompiling ALL your application and ANY libraries that
depend on reSIProcate in any way.
Because we do not have ABI protection in our shared libraries, it is
possible that you are suffering from stale code generation that is
using an older ABI.
One side effect of this is that you cannot use shared libraries from
one version of reSIProcate to the next.
It is highly recommended that you completely recompile your
application in whole if you swap resiprocate versions.
Please let us know if this affects your experiences at all.
Best wishes,
Alan Hawrylyshen
reSIProcate guy-at-large