* Committing new wxSocket core (socket.cpp sckint.cpp). It has to be improved ...

* Adding sckint.cpp to various makefiles.
* Fixes in threadpsx.cpp (Pause/Resume)
* Fixes in threaded event dispatching
* Added Clone() to wxObject
* Implemented Clone() in wxEvent and wxSocketEvent
* wxSocket sample save the data got from the URL in test.url (this will change)
* As I only tested wxSocket on Linux Redhat 5.2 I disabled it by default on
  Windows, Mac and Unix platforms.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-04-26 18:16:56 +00:00
parent 6a3ab8b15a
commit a737331db6
26 changed files with 1013 additions and 1190 deletions

View File

@@ -325,7 +325,8 @@ wxThreadInternal::wxThreadInternal()
wxThreadInternal::~wxThreadInternal()
{
m_mutexSuspend.Unlock();
// GL: moved to SignalExit
// m_mutexSuspend.Unlock();
// note that m_mutex will be unlocked by the thread which waits for our
// termination
@@ -375,6 +376,9 @@ void wxThreadInternal::Wait()
void wxThreadInternal::SignalExit()
{
// GL: Unlock mutexSuspend here.
m_mutexSuspend.Unlock();
// as mutex is currently locked, this will block until some other thread
// (normally the same which created this one) unlocks it by entering Wait()
m_mutex.Lock();
@@ -453,9 +457,7 @@ wxThread::wxThread()
wxThreadError wxThread::Create()
{
// Maybe we could think about recreate the thread once it has exited.
if (p_internal->GetState() != STATE_NEW &&
p_internal->GetState() != STATE_EXITED)
if (p_internal->GetState() != STATE_NEW)
return wxTHREAD_RUNNING;
// set up the thread attribute: right now, we only set thread priority
@@ -590,7 +592,9 @@ wxThreadError wxThread::Resume()
if ( p_internal->GetState() == STATE_PAUSED )
{
m_critsect.Leave();
p_internal->Resume();
m_critsect.Enter();
return wxTHREAD_NO_ERROR;
}
@@ -727,6 +731,13 @@ bool wxThread::IsAlive() const
}
}
bool wxThread::IsPaused() const
{
wxCriticalSectionLocker lock((wxCriticalSection&)m_critsect);
return (p_internal->GetState() == STATE_PAUSED);
}
//--------------------------------------------------------------------
// wxThreadModule
//--------------------------------------------------------------------